summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-25 22:09:36 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-25 22:09:36 (GMT)
commit11b9190a182c5f3c1055c100145b02a3975509ed (patch)
tree2c664ad92363204c320e23f9d1e6ca29505eaf2e /src/gui/styles
parent03686225036ebfc5cf78e3fcc66f5810a140c7d2 (diff)
parent3671dbf34940e166b747b6f8f3f5758fd486073c (diff)
downloadQt-11b9190a182c5f3c1055c100145b02a3975509ed.zip
Qt-11b9190a182c5f3c1055c100145b02a3975509ed.tar.gz
Qt-11b9190a182c5f3c1055c100145b02a3975509ed.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: src/declarative/graphicsitems/qdeclarativeitem.cpp
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
-rw-r--r--src/gui/styles/qplastiquestyle.cpp4
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
-rw-r--r--src/gui/styles/qwindowsstyle.cpp2
-rw-r--r--src/gui/styles/qwindowsstyle_p.h4
-rw-r--r--src/gui/styles/qwindowsvistastyle_p.h1
6 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 116b03e..7097291 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -237,12 +237,14 @@ void drawTabShape(QPainter *p, const QStyleOptionTabV3 *tabOpt)
// fill body
if (active) {
- p->fillRect(rect, QColor(151, 151, 151));
+ int d = (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? 16 : 0;
+ p->fillRect(rect, QColor(151 + d, 151 + d, 151 + d));
} else {
+ int d = (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? 9 : 0;
QLinearGradient gradient(rect.topLeft(), rect.bottomLeft());
- gradient.setColorAt(0, QColor(207, 207, 207));
- gradient.setColorAt(0.5, QColor(206, 206, 206));
- gradient.setColorAt(1, QColor(201, 201, 201));
+ gradient.setColorAt(0, QColor(207 + d, 207 + d, 207 + d));
+ gradient.setColorAt(0.5, QColor(206 + d, 206 + d, 206 + d));
+ gradient.setColorAt(1, QColor(201 + d, 201 + d, 201 + d));
p->fillRect(rect, gradient);
}
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 9f69fd8..4ae9f79 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -56,7 +56,6 @@ static const int blueFrameWidth = 2; // with of line edit focus frame
#include <qabstractitemview.h>
#include <qcheckbox.h>
#include <qcombobox.h>
-#include <qdatetime.h>
#include <qdebug.h>
#include <qdialogbuttonbox.h>
#include <qformlayout.h>
@@ -81,6 +80,7 @@ static const int blueFrameWidth = 2; // with of line edit focus frame
#include <qsplitter.h>
#include <qstyleoption.h>
#include <qtextedit.h>
+#include <qelapsedtimer.h>
#include <qtoolbar.h>
#include <qtoolbox.h>
#include <qtoolbutton.h>
@@ -980,7 +980,7 @@ public:
#ifndef QT_NO_PROGRESSBAR
QList<QProgressBar *> bars;
int progressBarAnimateTimer;
- QTime timer;
+ QElapsedTimer timer;
#endif
};
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 5376386..cc0ce08 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -2541,7 +2541,7 @@ void QStyleSheetStyle::setPalette(QWidget *w)
int state;
QPalette::ColorGroup group;
} map[3] = {
- { PseudoClass_Active | PseudoClass_Enabled, QPalette::Active },
+ { int(PseudoClass_Active | PseudoClass_Enabled), QPalette::Active },
{ PseudoClass_Disabled, QPalette::Disabled },
{ PseudoClass_Enabled, QPalette::Inactive }
};
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 6c48590..60c06ca 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -497,7 +497,7 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
{
#ifndef Q_OS_WINCE
NONCLIENTMETRICS ncm;
- ncm.cbSize = sizeof(NONCLIENTMETRICS);
+ ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONT);
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0))
ret = qMax(ncm.iScrollHeight, ncm.iScrollWidth);
else
diff --git a/src/gui/styles/qwindowsstyle_p.h b/src/gui/styles/qwindowsstyle_p.h
index 808abe1..2a89b84 100644
--- a/src/gui/styles/qwindowsstyle_p.h
+++ b/src/gui/styles/qwindowsstyle_p.h
@@ -58,8 +58,8 @@
#ifndef QT_NO_STYLE_WINDOWS
#include <qlist.h>
-#include <qdatetime.h>
#include <qhash.h>
+#include <qelapsedtimer.h>
QT_BEGIN_NAMESPACE
@@ -80,7 +80,7 @@ public:
QList<QProgressBar *> bars;
int animationFps;
int animateTimer;
- QTime startTime;
+ QElapsedTimer startTime;
int animateStep;
QColor inactiveCaptionText;
QColor activeCaptionColor;
diff --git a/src/gui/styles/qwindowsvistastyle_p.h b/src/gui/styles/qwindowsvistastyle_p.h
index 673568d..ab941a1 100644
--- a/src/gui/styles/qwindowsvistastyle_p.h
+++ b/src/gui/styles/qwindowsvistastyle_p.h
@@ -86,6 +86,7 @@
#include <qlistview.h>
#include <qtableview.h>
#include <qbasictimer.h>
+#include <qdatetime.h>
#include <qcommandlinkbutton.h>
QT_BEGIN_NAMESPACE