Better DPI, Cleaner c-tor.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5433 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-10-17 13:31:04 +00:00
parent dde4440425
commit b265e8fb05
4 changed files with 12 additions and 9 deletions

View File

@ -1,9 +1,14 @@
2002-10-17 Angus Leeming <leeming@lyx.org>
* lyx_gui.C (getDPI): use an average of DpiX and DpiY.
* QBrowseBox.[Ch] (c-tor): remove unneeded arguments.
2002-10-17 André Pönitz <poenitz@lyx.org> 2002-10-17 André Pönitz <poenitz@lyx.org>
* QBrowseBox.[Ch]: fix style issues * QBrowseBox.[Ch]: fix style issues
2002-10-16 Angus Leeming <leeming@lyx.org> 2002-10-17 Angus Leeming <leeming@lyx.org>
* ui/moc/Makefile.am: * ui/moc/Makefile.am:
* moc/Makefile.am: add a distclean-local target to remove *_moc.C. * moc/Makefile.am: add a distclean-local target to remove *_moc.C.

View File

@ -2,7 +2,7 @@
* \file QBrowseBox.C * \file QBrowseBox.C
* *
* Original file taken from klyx 0.10 sources: * Original file taken from klyx 0.10 sources:
* $Id: QBrowseBox.C,v 1.4 2002/10/17 09:51:18 poenitz Exp $ * $Id: QBrowseBox.C,v 1.5 2002/10/17 13:31:04 leeming Exp $
* *
* \author Kalle Dalheimer ? * \author Kalle Dalheimer ?
* *
@ -25,8 +25,7 @@
#include "QBrowseBox.h" #include "QBrowseBox.h"
QBrowseBox::QBrowseBox(int rows, int cols, QWidget * parent, QBrowseBox::QBrowseBox(int rows, int cols)
char const * name, WFlags fl)
: QGridView() : QGridView()
{ {
setNumRows(rows); setNumRows(rows);
@ -157,7 +156,7 @@ void QBrowseBox::keyPressEvent(QKeyEvent * e)
} }
void QBrowseBox::mouseReleaseEvent(QMouseEvent * e) void QBrowseBox::mouseReleaseEvent(QMouseEvent *)
{ {
qWarning("mouse release"); qWarning("mouse release");
emit selected( activecell_.x(), activecell_.y()); emit selected( activecell_.x(), activecell_.y());

View File

@ -3,7 +3,7 @@
* \file QBrowseBox.h * \file QBrowseBox.h
* *
* Original file taken from klyx 0.10 sources: * Original file taken from klyx 0.10 sources:
* $Id: QBrowseBox.h,v 1.2 2002/10/17 09:51:18 poenitz Exp $ * $Id: QBrowseBox.h,v 1.3 2002/10/17 13:31:04 leeming Exp $
* *
* \author Kalle Dalheimer ? * \author Kalle Dalheimer ?
* *
@ -27,8 +27,7 @@ class QBrowseBox : public QGridView
{ {
Q_OBJECT Q_OBJECT
public: public:
QBrowseBox(int rows, int cols, QWidget * parent = 0, QBrowseBox(int rows, int cols);
char const * name = 0, WFlags f = 0);
~QBrowseBox(); ~QBrowseBox();
void insertItem(QString const & text, int x, int y); void insertItem(QString const & text, int x, int y);

View File

@ -67,7 +67,7 @@ float getDPI()
{ {
QWidget w; QWidget w;
QPaintDeviceMetrics pdm(&w); QPaintDeviceMetrics pdm(&w);
return pdm.logicalDpiY(); return 0.5 * (pdm.logicalDpiX() + pdm.logicalDpiY());
} }
} }