mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
Implement getDPI
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5399 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6bc60cc596
commit
8c9ad457e9
@ -1,3 +1,7 @@
|
||||
2002-10-14 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* lyx_gui.C (getDPI): Implemented.
|
||||
|
||||
2002-10-12 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* qfont_loader.C (available): Implemented.
|
||||
|
@ -48,6 +48,8 @@
|
||||
#include "io_callback.h"
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qwidget.h>
|
||||
#include <qpaintdevicemetrics.h>
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::exit;
|
||||
@ -60,8 +62,14 @@ using std::endl;
|
||||
extern BufferList bufferlist;
|
||||
|
||||
namespace {
|
||||
/// good ol' "easy to use" Qt again
|
||||
float getDPI() { return 95; }
|
||||
|
||||
float getDPI()
|
||||
{
|
||||
QWidget w;
|
||||
QPaintDeviceMetrics pdm(&w);
|
||||
return pdm.logicalDpiY();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FIXME: wrong place !
|
||||
|
Loading…
Reference in New Issue
Block a user