summaryrefslogtreecommitdiff
path: root/library/lightstyle.cpp
Side-by-side diff
Diffstat (limited to 'library/lightstyle.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/lightstyle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp
index f18bdca..3bd1623 100644
--- a/library/lightstyle.cpp
+++ b/library/lightstyle.cpp
@@ -14,17 +14,17 @@
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "lightstyle.h"
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#define INCLUDE_MENUITEM_DEF
#include "qmenubar.h"
#include "qapplication.h"
#include "qpainter.h"
#include "qpalette.h"
#include "qframe.h"
#include "qpushbutton.h"
@@ -154,34 +154,34 @@ QSize LightStyle::indicatorSize() const
}
void LightStyle::polish(QWidget *widget)
{
if (widget->inherits("QPushButton"))
widget->installEventFilter(this);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if (widget->inherits("QLineEdit")) {
QLineEdit *lineedit = (QLineEdit *) widget;
lineedit->setFrameShape(QFrame::StyledPanel);
lineedit->setLineWidth(2);
}
#endif
QWindowsStyle::polish(widget);
}
void LightStyle::unPolish(QWidget *widget)
{
if (widget->inherits("QPushButton"))
widget->removeEventFilter(this);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if (widget->inherits("QLineEdit")) {
QLineEdit *lineedit = (QLineEdit *) widget;
lineedit->setLineWidth(1);
lineedit->setFrameShape(QFrame::WinPanel);
}
#endif
QWindowsStyle::unPolish(widget);
@@ -409,34 +409,34 @@ void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
r.width() + defaultFrameWidth(),
r.height() + defaultFrameWidth(),
g, TRUE);
}
int indent = ((y + h) / 2) - 3;
int xpos = x;
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if( QApplication::reverseLayout() )
xpos += indent;
else
#endif
xpos += w - indent - 5;
drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill);
}
QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const
{
QRect r(x + 3, y + 3, w - 6, h - 6);
int indent = ((y + h) / 2) - 3;
r.setRight(r.right() - indent - 10);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if( QApplication::reverseLayout() )
r.moveBy( indent + 10, 0 );
#endif
return r;
}