+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.
#include "io_callback.h"
#include <qapplication.h>
+#include <qwidget.h>
+#include <qpaintdevicemetrics.h>
#ifndef CXX_GLOBAL_CSTD
using std::exit;
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 !