summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-30 09:21:56 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-30 09:21:56 (GMT)
commit197df24edfe095a10e2bf65116796e027fea44e2 (patch)
tree4ffb08f614b550298663f90297c9e559ecb47a3c /src/gui/styles
parent1e84894225e31adf80a7a33da7f655fb5c38ea0e (diff)
parente3c1039d4d10aa383a1f681e7dd9c1129d22d8ca (diff)
downloadQt-197df24edfe095a10e2bf65116796e027fea44e2.zip
Qt-197df24edfe095a10e2bf65116796e027fea44e2.tar.gz
Qt-197df24edfe095a10e2bf65116796e027fea44e2.tar.bz2
Merge commit 'qt/master-stable' into 4.6-merged
Conflicts: .gitignore configure.exe src/corelib/concurrent/qtconcurrentthreadengine.h src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicssceneevent.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_p.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qwidget.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkaccesshttpbackend.cpp tests/auto/network-settings.h tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/gtksymbols.cpp4
-rw-r--r--src/gui/styles/gtksymbols_p.h4
-rw-r--r--src/gui/styles/qcdestyle.cpp4
-rw-r--r--src/gui/styles/qcdestyle.h4
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp7
-rw-r--r--src/gui/styles/qcleanlooksstyle.h4
-rw-r--r--src/gui/styles/qcleanlooksstyle_p.h4
-rw-r--r--src/gui/styles/qcommonstyle.cpp91
-rw-r--r--src/gui/styles/qcommonstyle.h4
-rw-r--r--src/gui/styles/qcommonstyle_p.h4
-rw-r--r--src/gui/styles/qcommonstylepixmaps_p.h4
-rw-r--r--src/gui/styles/qgtkpainter.cpp4
-rw-r--r--src/gui/styles/qgtkpainter_p.h4
-rw-r--r--src/gui/styles/qgtkstyle.cpp23
-rw-r--r--src/gui/styles/qgtkstyle.h4
-rw-r--r--src/gui/styles/qmacstyle_mac.h4
-rw-r--r--src/gui/styles/qmacstyle_mac.mm581
-rw-r--r--src/gui/styles/qmacstylepixmaps_mac_p.h1404
-rw-r--r--src/gui/styles/qmotifstyle.cpp4
-rw-r--r--src/gui/styles/qmotifstyle.h4
-rw-r--r--src/gui/styles/qmotifstyle_p.h4
-rw-r--r--src/gui/styles/qplastiquestyle.cpp7
-rw-r--r--src/gui/styles/qplastiquestyle.h4
-rw-r--r--src/gui/styles/qproxystyle.cpp150
-rw-r--r--src/gui/styles/qproxystyle.h4
-rw-r--r--src/gui/styles/qproxystyle_p.h4
-rw-r--r--src/gui/styles/qstyle.cpp36
-rw-r--r--src/gui/styles/qstyle.h4
-rw-r--r--src/gui/styles/qstyle_p.h4
-rw-r--r--src/gui/styles/qstylefactory.cpp4
-rw-r--r--src/gui/styles/qstylefactory.h4
-rw-r--r--src/gui/styles/qstylehelper.cpp31
-rw-r--r--src/gui/styles/qstylehelper_p.h5
-rw-r--r--src/gui/styles/qstyleoption.cpp7
-rw-r--r--src/gui/styles/qstyleoption.h4
-rw-r--r--src/gui/styles/qstyleplugin.cpp4
-rw-r--r--src/gui/styles/qstyleplugin.h4
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp4
-rw-r--r--src/gui/styles/qstylesheetstyle_default.cpp4
-rw-r--r--src/gui/styles/qstylesheetstyle_p.h4
-rw-r--r--src/gui/styles/qwindowscestyle.cpp4
-rw-r--r--src/gui/styles/qwindowscestyle.h4
-rw-r--r--src/gui/styles/qwindowscestyle_p.h4
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp4
-rw-r--r--src/gui/styles/qwindowsmobilestyle.h4
-rw-r--r--src/gui/styles/qwindowsmobilestyle_p.h4
-rw-r--r--src/gui/styles/qwindowsstyle.cpp30
-rw-r--r--src/gui/styles/qwindowsstyle.h4
-rw-r--r--src/gui/styles/qwindowsstyle_p.h4
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp88
-rw-r--r--src/gui/styles/qwindowsvistastyle.h4
-rw-r--r--src/gui/styles/qwindowsvistastyle_p.h4
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp20
-rw-r--r--src/gui/styles/qwindowsxpstyle.h4
-rw-r--r--src/gui/styles/qwindowsxpstyle_p.h4
55 files changed, 561 insertions, 2083 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index f92fd0e..f553d27 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/gtksymbols_p.h b/src/gui/styles/gtksymbols_p.h
index 74c5dc3..b0195d2 100644
--- a/src/gui/styles/gtksymbols_p.h
+++ b/src/gui/styles/gtksymbols_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcdestyle.cpp b/src/gui/styles/qcdestyle.cpp
index b58c41c..51f2b8d 100644
--- a/src/gui/styles/qcdestyle.cpp
+++ b/src/gui/styles/qcdestyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcdestyle.h b/src/gui/styles/qcdestyle.h
index bb752d3..7d2b3cd 100644
--- a/src/gui/styles/qcdestyle.h
+++ b/src/gui/styles/qcdestyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index ac433b4..3855ba7 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1738,8 +1738,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
// same rendering code for both orientations.
if (vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height
- QTransform m;
- m.translate(rect.height()-1, -1.0);
+ QTransform m = QTransform::fromTranslate(rect.height()-1, -1.0);
m.rotate(90.0);
painter->setTransform(m, true);
}
diff --git a/src/gui/styles/qcleanlooksstyle.h b/src/gui/styles/qcleanlooksstyle.h
index 1da457e..ebfb707 100644
--- a/src/gui/styles/qcleanlooksstyle.h
+++ b/src/gui/styles/qcleanlooksstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcleanlooksstyle_p.h b/src/gui/styles/qcleanlooksstyle_p.h
index dfc4441..a26d40d 100644
--- a/src/gui/styles/qcleanlooksstyle_p.h
+++ b/src/gui/styles/qcleanlooksstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 7d8436e..7b8b75e 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -770,6 +770,8 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight));
else if (vopt->features & QStyleOptionViewItemV2::Alternate)
p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase));
+ else if (!(vopt->state & QStyle::State_Enabled))
+ p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Base));
}
break;
case PE_PanelItemViewItem:
@@ -1963,8 +1965,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
newRot = -90;
}
tr.setRect(0, 0, tr.height(), tr.width());
- QTransform m;
- m.translate(newX, newY);
+ QTransform m = QTransform::fromTranslate(newX, newY);
m.rotate(newRot);
p->setTransform(m, true);
}
@@ -3196,7 +3197,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
//have all the information we need (ie. the layout's margin)
const QToolBar *tb = qobject_cast<const QToolBar*>(widget);
const int margin = tb && tb->layout() ? tb->layout()->margin() : 2;
- const int handleExtent = pixelMetric(QStyle::PM_ToolBarExtensionExtent, opt, tb);
+ const int handleExtent = pixelMetric(QStyle::PM_ToolBarHandleExtent, opt, tb);
if (tbopt->state & QStyle::State_Horizontal) {
r = QRect(margin, margin, handleExtent, tbopt->rect.height() - 2*margin);
r = QStyle::visualRect(tbopt->direction, tbopt->rect, r);
@@ -4534,17 +4535,17 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
ret = 0;
break;
case PM_DialogButtonsSeparator:
- ret = 5;
+ ret = int(QStyleHelper::dpiScaled(5.));
break;
case PM_DialogButtonsButtonWidth:
- ret = 70;
+ ret = int(QStyleHelper::dpiScaled(70.));
break;
case PM_DialogButtonsButtonHeight:
- ret = 30;
+ ret = int(QStyleHelper::dpiScaled(30.));
break;
case PM_CheckListControllerSize:
case PM_CheckListButtonSize:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_TitleBarHeight: {
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) {
@@ -4552,26 +4553,26 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
ret = qMax(widget ? widget->fontMetrics().lineSpacing() : opt->fontMetrics.lineSpacing(), 16);
#ifndef QT_NO_DOCKWIDGET
} else if (qobject_cast<const QDockWidget*>(widget)) {
- ret = qMax(widget->fontMetrics().lineSpacing(), 13);
+ ret = qMax(widget->fontMetrics().lineSpacing(), int(QStyleHelper::dpiScaled(13)));
#endif
} else {
ret = qMax(widget ? widget->fontMetrics().lineSpacing() : opt->fontMetrics.lineSpacing(), 18);
}
} else {
- ret = 18;
+ ret = int(QStyleHelper::dpiScaled(18.));
}
break; }
case PM_ScrollBarSliderMin:
- ret = 9;
+ ret = int(QStyleHelper::dpiScaled(9.));
break;
case PM_ButtonMargin:
- ret = 6;
+ ret = int(QStyleHelper::dpiScaled(6.));
break;
case PM_DockWidgetTitleBarButtonMargin:
- ret = 2;
+ ret = int(QStyleHelper::dpiScaled(2.));
break;
case PM_ButtonDefaultIndicator:
@@ -4579,7 +4580,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_MenuButtonIndicator:
- ret = 12;
+ ret = int(QStyleHelper::dpiScaled(12.));
break;
case PM_ButtonShiftHorizontal:
@@ -4598,11 +4599,11 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_MdiSubWindowFrameWidth:
- ret = 4;
+ ret = int(QStyleHelper::dpiScaled(4.));
break;
case PM_MdiSubWindowMinimizedWidth:
- ret = 196;
+ ret = int(QStyleHelper::dpiScaled(196.));
break;
#ifndef QT_NO_SCROLLBAR
@@ -4613,7 +4614,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
: QApplication::globalStrut().width();
ret = qMax(16, s);
} else {
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
}
break;
#endif
@@ -4623,7 +4624,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
#ifndef QT_NO_SLIDER
case PM_SliderThickness:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_SliderTickmarkOffset:
@@ -4657,11 +4658,11 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
#endif // QT_NO_SLIDER
#ifndef QT_NO_DOCKWIDGET
case PM_DockWidgetSeparatorExtent:
- ret = 6;
+ ret = int(QStyleHelper::dpiScaled(6.));
break;
case PM_DockWidgetHandleExtent:
- ret = 8;
+ ret = int(QStyleHelper::dpiScaled(8.));
break;
case PM_DockWidgetTitleMargin:
ret = 0;
@@ -4690,19 +4691,19 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_ToolBarItemSpacing:
- ret = 4;
+ ret = int(QStyleHelper::dpiScaled(4.));
break;
case PM_ToolBarHandleExtent:
- ret = 8;
+ ret = int(QStyleHelper::dpiScaled(8.));
break;
case PM_ToolBarSeparatorExtent:
- ret = 6;
+ ret = int(QStyleHelper::dpiScaled(6.));
break;
case PM_ToolBarExtensionExtent:
- ret = 12;
+ ret = int(QStyleHelper::dpiScaled(12.));
break;
#endif // QT_NO_TOOLBAR
@@ -4712,7 +4713,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_TabBarTabHSpace:
- ret = 24;
+ ret = int(QStyleHelper::dpiScaled(24.));
break;
case PM_TabBarTabShiftHorizontal:
@@ -4741,27 +4742,27 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_IndicatorWidth:
- ret = 13;
+ ret = int(QStyleHelper::dpiScaled(13.));
break;
case PM_IndicatorHeight:
- ret = 13;
+ ret = int(QStyleHelper::dpiScaled(13.));
break;
case PM_ExclusiveIndicatorWidth:
- ret = 12;
+ ret = int(QStyleHelper::dpiScaled(12.));
break;
case PM_ExclusiveIndicatorHeight:
- ret = 12;
+ ret = int(QStyleHelper::dpiScaled(12.));
break;
case PM_MenuTearoffHeight:
- ret = 10;
+ ret = int(QStyleHelper::dpiScaled(10.));
break;
case PM_MenuScrollerHeight:
- ret = 10;
+ ret = int(QStyleHelper::dpiScaled(10.));
break;
case PM_MenuDesktopFrameWidth:
@@ -4771,16 +4772,16 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_HeaderMargin:
- ret = 4;
+ ret = int(QStyleHelper::dpiScaled(4.));
break;
case PM_HeaderMarkSize:
- ret = 32;
+ ret = int(QStyleHelper::dpiScaled(32.));
break;
case PM_HeaderGripMargin:
- ret = 4;
+ ret = int(QStyleHelper::dpiScaled(4.));
break;
case PM_TabBarScrollButtonWidth:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_LayoutLeftMargin:
case PM_LayoutTopMargin:
@@ -4802,13 +4803,13 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_DefaultTopLevelMargin:
- ret = 11;
+ ret = int(QStyleHelper::dpiScaled(11.));
break;
case PM_DefaultChildMargin:
- ret = 9;
+ ret = int(QStyleHelper::dpiScaled(9.));
break;
case PM_DefaultLayoutSpacing:
- ret = 6;
+ ret = int(QStyleHelper::dpiScaled(6.));
break;
case PM_TabBarIconSize:
@@ -4819,14 +4820,14 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
case PM_ButtonIconSize:
case PM_SmallIconSize:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_IconViewIconSize:
ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
break;
case PM_LargeIconSize:
- ret = 32;
+ ret = int(QStyleHelper::dpiScaled(32.));
break;
case PM_ToolTipLabelFrameWidth:
@@ -4834,13 +4835,13 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_CheckBoxLabelSpacing:
case PM_RadioButtonLabelSpacing:
- ret = 6;
+ ret = int(QStyleHelper::dpiScaled(6.));
break;
case PM_SizeGripSize:
- ret = 13;
+ ret = int(QStyleHelper::dpiScaled(13.));
break;
case PM_MessageBoxIconSize:
- ret = 32;
+ ret = int(QStyleHelper::dpiScaled(32.));
break;
case PM_TextCursorWidth:
ret = 1;
@@ -4850,7 +4851,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_TabCloseIndicatorWidth:
case PM_TabCloseIndicatorHeight:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_ScrollView_ScrollBarSpacing:
ret = 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget);
diff --git a/src/gui/styles/qcommonstyle.h b/src/gui/styles/qcommonstyle.h
index 367afc0..ce54a96 100644
--- a/src/gui/styles/qcommonstyle.h
+++ b/src/gui/styles/qcommonstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h
index a941706..27ebc05 100644
--- a/src/gui/styles/qcommonstyle_p.h
+++ b/src/gui/styles/qcommonstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qcommonstylepixmaps_p.h b/src/gui/styles/qcommonstylepixmaps_p.h
index c4adb76..f01ba08 100644
--- a/src/gui/styles/qcommonstylepixmaps_p.h
+++ b/src/gui/styles/qcommonstylepixmaps_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qgtkpainter.cpp b/src/gui/styles/qgtkpainter.cpp
index 3d47b80..8e2ab74 100644
--- a/src/gui/styles/qgtkpainter.cpp
+++ b/src/gui/styles/qgtkpainter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qgtkpainter_p.h b/src/gui/styles/qgtkpainter_p.h
index dc0bc98..64a5c9b 100644
--- a/src/gui/styles/qgtkpainter_p.h
+++ b/src/gui/styles/qgtkpainter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 28dff3b..852d3fd 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1,7 +1,7 @@
/******* *********************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -150,7 +150,6 @@ bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e)
if (e->type() == QEvent::ApplicationPaletteChange) {
// Only do this the first time since this will also
// generate applicationPaletteChange events
- extern QHash<QByteArray, QPalette> *qt_app_palettes_hash(); //qapplication.cpp
if (!qt_app_palettes_hash() || qt_app_palettes_hash()->isEmpty()) {
QGtk::applyCustomPaletteHash();
}
@@ -788,24 +787,21 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_IndicatorBranch:
if (option->state & State_Children) {
QRect rect = option->rect;
- rect = QRect(0, 0, 10, 10);
+ rect = QRect(0, 0, 12, 12);
rect.moveCenter(option->rect.center());
rect.translate(2, 0);
GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED;
GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED;
- GtkWidget *gtkExpander = QGtk::gtkWidget(QLS("GtkExpander"));
- guint expanderSize;
- QGtk::gtk_widget_style_get(gtkExpander, "expander-size", &expanderSize, NULL);
- // Note CleanIce will crash unless a GtkExpander is provided
- // but providing the expander will enforce the expander-size, which we
- // don't neccessarily have room for
+ GtkWidget *gtkTreeView = QGtk::gtkWidget(QLS("GtkTreeView"));
+
GtkStateType state = GTK_STATE_NORMAL;
if (!(option->state & State_Enabled))
state = GTK_STATE_INSENSITIVE;
else if (option->state & State_MouseOver)
state = GTK_STATE_PRELIGHT;
- gtkPainter.paintExpander(expanderSize <= 10 ? gtkExpander : NULL, "expander", rect, state,
- option->state & State_Open ? openState : closedState , gtkExpander->style);
+
+ gtkPainter.paintExpander(gtkTreeView, "treeview", rect, state,
+ option->state & State_Open ? openState : closedState , gtkTreeView->style);
}
break;
case PE_PanelItemViewItem:
@@ -2851,8 +2847,7 @@ void QGtkStyle::drawControl(ControlElement element,
if (vertical) {
rect.translate(xt, -yt * 2);
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // Flip width and height
- QTransform m;
- m.translate(rect.height(), 0);
+ QTransform m = QTransform::fromTranslate(rect.height(), 0);
m.rotate(90.0);
painter->setTransform(m);
}
diff --git a/src/gui/styles/qgtkstyle.h b/src/gui/styles/qgtkstyle.h
index b7d5bcf..e12f175 100644
--- a/src/gui/styles/qgtkstyle.h
+++ b/src/gui/styles/qgtkstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qmacstyle_mac.h b/src/gui/styles/qmacstyle_mac.h
index f043a66..e4228f9 100644
--- a/src/gui/styles/qmacstyle_mac.h
+++ b/src/gui/styles/qmacstyle_mac.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index ec75138..b20db5b 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +50,7 @@
#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN
//#define DEBUG_SIZE_CONSTRAINT
+#include <private/qapplication_p.h>
#include <private/qcombobox_p.h>
#include <private/qmacstylepixmaps_mac_p.h>
#include <private/qpaintengine_mac_p.h>
@@ -103,7 +104,6 @@
QT_BEGIN_NAMESPACE
extern QRegion qt_mac_convert_mac_region(RgnHandle); //qregion_mac.cpp
-extern QHash<QByteArray, QFont> *qt_app_fonts_hash(); // qapplication.cpp
// The following constants are used for adjusting the size
// of push buttons so that they are drawn inside their bounds.
@@ -506,8 +506,6 @@ public:
void drawColorlessButton(const HIRect &macRect, HIThemeButtonDrawInfo *bdi,
QPainter *p, const QStyleOption *opt) const;
- void drawPantherTab(const QStyleOptionTab *tab, QPainter *p, const QWidget *w = 0) const;
-
QSize pushButtonSizeFromContents(const QStyleOptionButton *btn) const;
HIRect pushButtonContentBounds(const QStyleOptionButton *btn,
@@ -581,11 +579,7 @@ QPixmap *qt_mac_backgroundPattern = 0; // stores the standard widget background.
*****************************************************************************/
static inline int qt_mac_hitheme_tab_version()
{
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4)
- return 1;
-#endif
- return 0;
+ return 1;
}
static inline HIRect qt_hirectForQRect(const QRect &convertRect, const QRect &rect = QRect())
@@ -1471,8 +1465,7 @@ void QMacStylePrivate::getSliderInfo(QStyle::ComplexControl cc, const QStyleOpti
}
// Tiger broke reverse scroll bars so put them back and "fake it"
- if (isScrollbar && (tdi->attributes & kThemeTrackRightToLeft)
- && QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {
+ if (isScrollbar && (tdi->attributes & kThemeTrackRightToLeft)) {
tdi->attributes &= ~kThemeTrackRightToLeft;
tdi->value = tdi->max - slider->sliderPosition;
}
@@ -1555,166 +1548,6 @@ void QMacStylePrivate::startAnimationTimer()
timerID = startTimer(animateSpeed(AquaListViewItemOpen));
}
-enum { TabNormalLeft, TabNormalMid, TabNormalRight, TabSelectedActiveLeft,
- TabSelectedActiveMid, TabSelectedActiveRight, TabSelectedInactiveLeft,
- TabSelectedInactiveMid, TabSelectedInactiveRight, TabSelectedActiveGraphiteLeft,
- TabSelectedActiveGraphiteMid, TabSelectedActiveGraphiteRight,
- TabPressedLeft, TabPressedMid, TabPressedRight };
-
-static const char * const * const PantherTabXpms[] = {
- qt_mac_tabnrm_left,
- qt_mac_tabnrm_mid,
- qt_mac_tabnrm_right,
- qt_mac_tabselected_active_left,
- qt_mac_tabselected_active_mid,
- qt_mac_tabselected_active_right,
- qt_mac_tabselected_inactive_left,
- qt_mac_tabselected_inactive_mid,
- qt_mac_tabselected_inactive_right,
- qt_mac_tab_selected_active_graph_left,
- qt_mac_tab_selected_active_graph_mid,
- qt_mac_tab_selected_active_graph_right,
- qt_mac_tab_press_left,
- qt_mac_tab_press_mid,
- qt_mac_tab_press_right};
-
-void QMacStylePrivate::drawPantherTab(const QStyleOptionTab *tabOpt, QPainter *p,
- const QWidget *) const
-{
- QString tabKey = QLatin1String("$qt_mac_style_tab_");
- int pantherTabStart;
- int pantherTabMid;
- int pantherTabEnd;
-
- ThemeTabDirection ttd = getTabDirection(tabOpt->shape);
-
- if (tabOpt->state & QStyle::State_Selected) {
- if (!(tabOpt->state & QStyle::State_Active)) {
- pantherTabStart = TabSelectedInactiveLeft;
- } else {
- // Draw into a pixmap to determine which version we use, Aqua or Graphite.
- QPixmap tabPix(20, 20);
- QPainter pixPainter(&tabPix);
- HIThemeTabDrawInfo tdi;
- tdi.version = 0;
- tdi.style = kThemeTabFront;
- tdi.direction = kThemeTabNorth;
- tdi.size = kHIThemeTabSizeNormal;
- tdi.adornment = kHIThemeTabAdornmentNone;
- HIRect inRect = CGRectMake(0.0f, 0.0f, 20.0f, 20.0f);
- HIThemeDrawTab(&inRect, &tdi, QMacCGContext(&pixPainter), kHIThemeOrientationNormal, 0);
- pixPainter.end();
- const QRgb GraphiteColor = 0xffa7b0ba;
- QRgb pmColor = tabPix.toImage().pixel(10, 10);
- if (qAbs(qRed(pmColor) - qRed(GraphiteColor)) < 3 &&
- qAbs(qGreen(pmColor) - qGreen(GraphiteColor)) < 3
- && qAbs(qBlue(pmColor) - qBlue(GraphiteColor)) < 3)
- pantherTabStart = TabSelectedActiveGraphiteLeft;
- else
- pantherTabStart = TabSelectedActiveLeft;
- }
- } else if (tabOpt->state & QStyle::State_Sunken) {
- pantherTabStart = TabPressedLeft;
- } else {
- pantherTabStart = TabNormalLeft;
- }
-
-
- bool doLine;
- bool verticalTabs = ttd == kThemeTabWest || ttd == kThemeTabEast;
-
- QStyleOptionTab::TabPosition tp = tabOpt->position;
- if (ttd == kThemeTabWest
- || ((ttd == kThemeTabNorth || ttd == kThemeTabSouth)
- && tabOpt->direction == Qt::RightToLeft)) {
- if (tp == QStyleOptionTab::Beginning)
- tp = QStyleOptionTab::End;
- else if (tp == QStyleOptionTab::End)
- tp = QStyleOptionTab::Beginning;
- }
-
- switch (tp) {
- default: // Stupid GCC, being overly pedantic
- case QStyleOptionTab::Beginning:
- doLine = false;
- pantherTabMid = pantherTabEnd = pantherTabStart + 1;
- break;
- case QStyleOptionTab::Middle:
- doLine = true;
- pantherTabMid = pantherTabEnd = ++pantherTabStart;
- break;
- case QStyleOptionTab::End:
- doLine = true;
- pantherTabMid = ++pantherTabStart;
- pantherTabEnd = pantherTabMid + 1;
- break;
- case QStyleOptionTab::OnlyOneTab:
- doLine = false;
- pantherTabMid = pantherTabStart + 1;
- pantherTabEnd = pantherTabMid + 1;
- break;
- }
-
- QPixmap pmStart;
- if (!QPixmapCache::find(tabKey + QString::number(pantherTabStart), pmStart)) {
- pmStart = QPixmap(PantherTabXpms[pantherTabStart]);
- QPixmapCache::insert(tabKey + QString::number(pantherTabStart), pmStart);
- }
-
- QPixmap pmMid;
- if (!QPixmapCache::find(tabKey + QString::number(pantherTabMid), pmMid)) {
- pmMid = QPixmap(PantherTabXpms[pantherTabMid]);
- QPixmapCache::insert(tabKey + QString::number(pantherTabMid), pmMid);
- }
-
- QPixmap pmEnd;
- if (!QPixmapCache::find(tabKey + QString::number(pantherTabEnd), pmEnd)) {
- pmEnd = QPixmap(PantherTabXpms[pantherTabEnd]);
- QPixmapCache::insert(tabKey + QString::number(pantherTabEnd), pmEnd);
- }
- QRect tr = tabOpt->rect;
- if (verticalTabs) {
- p->save();
- int newX, newY, newRot;
- if (tabOpt->shape == QTabBar::RoundedEast || tabOpt->shape == QTabBar::TriangularEast) {
- newX = tr.width();
- newY = tr.y();
- newRot = 90;
- } else {
- newX = 0;
- newY = tr.y() + tr.height();
- newRot = -90;
- }
- tr.setRect(0, 0, tr.height(), tr.width());
- QMatrix m;
- if (ttd == kThemeTabEast) {
- // It's lame but Apple inverts these on the East side.
- m.scale(-1, 1);
- m.translate(-tabOpt->rect.width(), 0);
- }
- m.translate(newX, newY);
- m.rotate(newRot);
- p->setMatrix(m, true);
- }
-
- int x = tr.x();
- int y = tr.y();
- int endX = x + tr.width() - pmEnd.width();
-
- p->drawPixmap(x, y, pmStart.width(), tr.height(), pmStart);
- if (doLine) {
- QPen oldPen = p->pen();
- p->setPen(QColor(0, 0, 0, 0x35));
- p->drawLine(x, y + (verticalTabs ? 0 : 1), x, tr.height() - 2);
- }
-
- for (x = x + pmStart.width(); x < endX; x += pmMid.width())
- p->drawPixmap(x, y, pmMid.width(), tr.height(), pmMid);
- p->drawPixmap(endX, y, pmEnd.width(), tr.height(), pmEnd);
- if (verticalTabs)
- p->restore();
-}
-
bool QMacStylePrivate::addWidget(QWidget *w)
{
//already knew of it
@@ -2027,22 +1860,10 @@ QMacStyle::~QMacStyle()
QPixmap QMacStylePrivate::generateBackgroundPattern() const
{
QPixmap px(4, 4);
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {
- QMacCGContext cg(&px);
- HIThemeSetFill(kThemeBrushDialogBackgroundActive, 0, cg, kHIThemeOrientationNormal);
- const CGRect cgRect = CGRectMake(0, 0, px.width(), px.height());
- CGContextFillRect(cg, cgRect);
- } else
-#endif
- {
-#ifndef QT_MAC_NO_QUICKDRAW
- QMacSavedPortInfo port(&px);
- SetThemeBackground(kThemeBrushDialogBackgroundActive, px.depth(), true);
- const Rect qdRect = { 0, 0, px.width(), px.height() };
- EraseRect(&qdRect);
-#endif
- }
+ QMacCGContext cg(&px);
+ HIThemeSetFill(kThemeBrushDialogBackgroundActive, 0, cg, kHIThemeOrientationNormal);
+ const CGRect cgRect = CGRectMake(0, 0, px.width(), px.height());
+ CGContextFillRect(cg, cgRect);
return px;
}
@@ -2052,14 +1873,13 @@ QPixmap QMacStylePrivate::generateBackgroundPattern() const
*/
void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint &offset, const QBrush &brush)
{
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
QPoint dummy;
const QPaintDevice *target = painter->device();
const QPaintDevice *redirected = QPainter::redirected(target, &dummy);
const bool usePainter = redirected && redirected != target;
const QRegion translated = rgn.translated(offset);
- if (!usePainter && QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4 && qt_mac_backgroundPattern
+ if (!usePainter && qt_mac_backgroundPattern
&& qt_mac_backgroundPattern->cacheKey() == brush.texture().cacheKey()) {
painter->setClipRegion(translated);
@@ -2078,9 +1898,7 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint
}
CGContextRestoreGState(cg);
- } else
-#endif
- {
+ } else {
const QRect rect(translated.boundingRect());
painter->setClipRegion(translated);
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
@@ -2150,18 +1968,6 @@ void QMacStyle::polish(QWidget* w)
}
}
- // Adjust the lineedit of the editable combo box
- if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_3) {
- if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(w)) {
- if (qobject_cast<QComboBox *>(lineEdit->parentWidget())
- && !lineEdit->testAttribute(Qt::WA_SetFont)) {
- QFont font = lineEdit->font();
- font.setPointSize(font.pointSize() - 1);
- lineEdit->setFont(font);
- }
- }
- }
-
if (QTabBar *tb = qobject_cast<QTabBar*>(w)) {
if (tb->documentMode()) {
w->setAttribute(Qt::WA_Hover);
@@ -2396,12 +2202,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
GetThemeMetric(kThemeMetricScrollBarWidth, &ret);
break;
case QAquaSizeMini:
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) && 0
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_3) {
- GetThemeMetric(kThemeMetricMiniScrollBarWidth, &ret);
- break;
- }
-#endif
case QAquaSizeSmall:
GetThemeMetric(kThemeMetricSmallScrollBarWidth, &ret);
break;
@@ -3318,27 +3118,14 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
if (const QStyleOptionTabWidgetFrame *twf
= qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
HIRect hirect = qt_hirectForQRect(twf->rect);
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {
- HIThemeTabPaneDrawInfo tpdi;
- tpdi.version = qt_mac_hitheme_tab_version();
- tpdi.state = tds;
- tpdi.direction = getTabDirection(twf->shape);
- tpdi.size = kHIThemeTabSizeNormal;
- if (tpdi.version == 1) {
- tpdi.kind = kHIThemeTabKindNormal;
- tpdi.adornment = kHIThemeTabPaneAdornmentNormal;
- }
- HIThemeDrawTabPane(&hirect, &tpdi, cg, kHIThemeOrientationNormal);
- } else
-#endif
- {
- HIThemeGroupBoxDrawInfo gdi;
- gdi.version = qt_mac_hitheme_version;
- gdi.state = tds;
- gdi.kind = kHIThemeGroupBoxKindSecondary;
- HIThemeDrawGroupBox(&hirect, &gdi, cg, kHIThemeOrientationNormal);
- }
+ HIThemeTabPaneDrawInfo tpdi;
+ tpdi.version = qt_mac_hitheme_tab_version();
+ tpdi.state = tds;
+ tpdi.direction = getTabDirection(twf->shape);
+ tpdi.size = kHIThemeTabSizeNormal;
+ tpdi.kind = kHIThemeTabKindNormal;
+ tpdi.adornment = kHIThemeTabPaneAdornmentNormal;
+ HIThemeDrawTabPane(&hirect, &tpdi, cg, kHIThemeOrientationNormal);
}
break;
case PE_PanelScrollAreaCorner: {
@@ -3362,7 +3149,6 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
QWindowsStyle::drawPrimitive(pe, opt, p, w);
break;
}
-
// Use the Leopard style only if the status bar is the status bar for a
// QMainWindow with a unifed toolbar.
if (w == 0 || w->parent() == 0 || qobject_cast<QMainWindow *>(w->parent()) == 0 ||
@@ -3790,104 +3576,104 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
return;
}
}
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3) {
- HIThemeTabDrawInfo tdi;
- tdi.version = 1;
- tdi.style = kThemeTabNonFront;
- tdi.direction = getTabDirection(tabOpt->shape);
- switch (d->aquaSizeConstrain(opt, w)) {
- default:
- case QAquaSizeUnknown:
- case QAquaSizeLarge:
- tdi.size = kHIThemeTabSizeNormal;
- break;
- case QAquaSizeSmall:
- tdi.size = kHIThemeTabSizeSmall;
+ HIThemeTabDrawInfo tdi;
+ tdi.version = 1;
+ tdi.style = kThemeTabNonFront;
+ tdi.direction = getTabDirection(tabOpt->shape);
+ switch (d->aquaSizeConstrain(opt, w)) {
+ default:
+ case QAquaSizeUnknown:
+ case QAquaSizeLarge:
+ tdi.size = kHIThemeTabSizeNormal;
+ break;
+ case QAquaSizeSmall:
+ tdi.size = kHIThemeTabSizeSmall;
+ break;
+ case QAquaSizeMini:
+ tdi.size = kHIThemeTabSizeMini;
+ break;
+ }
+ bool verticalTabs = tdi.direction == kThemeTabWest || tdi.direction == kThemeTabEast;
+ QRect tabRect = tabOpt->rect;
+
+ bool selected = tabOpt->state & State_Selected;
+ if (selected) {
+ if (!(tabOpt->state & State_Active))
+ tdi.style = kThemeTabFrontUnavailable;
+ else if (!(tabOpt->state & State_Enabled))
+ tdi.style = kThemeTabFrontInactive;
+ else
+ tdi.style = kThemeTabFront;
+ } else if (!(tabOpt->state & State_Active)) {
+ tdi.style = kThemeTabNonFrontUnavailable;
+ } else if (!(tabOpt->state & State_Enabled)) {
+ tdi.style = kThemeTabNonFrontInactive;
+ } else if (tabOpt->state & State_Sunken) {
+ tdi.style = kThemeTabFrontInactive; // (should be kThemeTabNonFrontPressed)
+ }
+ if (tabOpt->state & State_HasFocus)
+ tdi.adornment = kHIThemeTabAdornmentFocus;
+ else
+ tdi.adornment = kHIThemeTabAdornmentNone;
+ tdi.kind = kHIThemeTabKindNormal;
+ if (!verticalTabs)
+ tabRect.setY(tabRect.y() - 1);
+ else
+ tabRect.setX(tabRect.x() - 1);
+ QStyleOptionTab::TabPosition tp = tabOpt->position;
+ QStyleOptionTab::SelectedPosition sp = tabOpt->selectedPosition;
+ if (tabOpt->direction == Qt::RightToLeft && !verticalTabs) {
+ if (sp == QStyleOptionTab::NextIsSelected)
+ sp = QStyleOptionTab::PreviousIsSelected;
+ else if (sp == QStyleOptionTab::PreviousIsSelected)
+ sp = QStyleOptionTab::NextIsSelected;
+ switch (tp) {
+ case QStyleOptionTab::Beginning:
+ tp = QStyleOptionTab::End;
break;
- case QAquaSizeMini:
- tdi.size = kHIThemeTabSizeMini;
+ case QStyleOptionTab::End:
+ tp = QStyleOptionTab::Beginning;
break;
- }
- bool verticalTabs = tdi.direction == kThemeTabWest || tdi.direction == kThemeTabEast;
- QRect tabRect = tabOpt->rect;
-
- if ((!verticalTabs && tabRect.height() > 21 || verticalTabs && tabRect.width() > 21)) {
- d->drawPantherTab(tabOpt, p, w);
+ default:
break;
}
+ }
+ switch (tp) {
+ case QStyleOptionTab::Beginning:
+ tdi.position = kHIThemeTabPositionFirst;
+ if (sp != QStyleOptionTab::NextIsSelected)
+ tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
+ break;
+ case QStyleOptionTab::Middle:
+ tdi.position = kHIThemeTabPositionMiddle;
+ if (selected)
+ tdi.adornment |= kHIThemeTabAdornmentLeadingSeparator;
+ if (sp != QStyleOptionTab::NextIsSelected) // Also when we're selected.
+ tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
+ break;
+ case QStyleOptionTab::End:
+ tdi.position = kHIThemeTabPositionLast;
+ if (selected)
+ tdi.adornment |= kHIThemeTabAdornmentLeadingSeparator;
+ break;
+ case QStyleOptionTab::OnlyOneTab:
+ tdi.position = kHIThemeTabPositionOnly;
+ break;
+ }
- bool selected = tabOpt->state & State_Selected;
- if (selected) {
- if (!(tabOpt->state & State_Active))
- tdi.style = kThemeTabFrontUnavailable;
- else if (!(tabOpt->state & State_Enabled))
- tdi.style = kThemeTabFrontInactive;
- else
- tdi.style = kThemeTabFront;
- } else if (!(tabOpt->state & State_Active)) {
- tdi.style = kThemeTabNonFrontUnavailable;
- } else if (!(tabOpt->state & State_Enabled)) {
- tdi.style = kThemeTabNonFrontInactive;
- } else if (tabOpt->state & State_Sunken) {
- tdi.style = kThemeTabFrontInactive; // (should be kThemeTabNonFrontPressed)
- }
- if (tabOpt->state & State_HasFocus)
- tdi.adornment = kHIThemeTabAdornmentFocus;
- else
- tdi.adornment = kHIThemeTabAdornmentNone;
- tdi.kind = kHIThemeTabKindNormal;
- if (!verticalTabs)
- tabRect.setY(tabRect.y() - 1);
- else
- tabRect.setX(tabRect.x() - 1);
- QStyleOptionTab::TabPosition tp = tabOpt->position;
- QStyleOptionTab::SelectedPosition sp = tabOpt->selectedPosition;
- if (tabOpt->direction == Qt::RightToLeft && !verticalTabs) {
- if (sp == QStyleOptionTab::NextIsSelected)
- sp = QStyleOptionTab::PreviousIsSelected;
- else if (sp == QStyleOptionTab::PreviousIsSelected)
- sp = QStyleOptionTab::NextIsSelected;
- switch (tp) {
- case QStyleOptionTab::Beginning:
- tp = QStyleOptionTab::End;
- break;
- case QStyleOptionTab::End:
- tp = QStyleOptionTab::Beginning;
- break;
- default:
- break;
- }
- }
- switch (tp) {
- case QStyleOptionTab::Beginning:
- tdi.position = kHIThemeTabPositionFirst;
- if (sp != QStyleOptionTab::NextIsSelected)
- tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
- break;
- case QStyleOptionTab::Middle:
- tdi.position = kHIThemeTabPositionMiddle;
- if (selected)
- tdi.adornment |= kHIThemeTabAdornmentLeadingSeparator;
- if (sp != QStyleOptionTab::NextIsSelected) // Also when we're selected.
- tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
- break;
- case QStyleOptionTab::End:
- tdi.position = kHIThemeTabPositionLast;
- if (selected)
- tdi.adornment |= kHIThemeTabAdornmentLeadingSeparator;
- break;
- case QStyleOptionTab::OnlyOneTab:
- tdi.position = kHIThemeTabPositionOnly;
- break;
+ // HITheme doesn't stretch its tabs. Therefore we have to cheat and do the job ourselves.
+ if ((!verticalTabs && tabRect.height() > 21 || verticalTabs && tabRect.width() > 21)) {
+ HIRect hirect = CGRectMake(0, 0, 23, 23);
+ QPixmap pm(23, 23);
+ pm.fill(Qt::transparent);
+ {
+ QMacCGContext pmcg(&pm);
+ HIThemeDrawTab(&hirect, &tdi, pmcg, kHIThemeOrientationNormal, 0);
}
+ QStyleHelper::drawBorderPixmap(pm, p, tabRect, 7, 7, 7, 7);
+ } else {
HIRect hirect = qt_hirectForQRect(tabRect);
HIThemeDrawTab(&hirect, &tdi, cg, kHIThemeOrientationNormal, 0);
- } else
-#endif
- {
- d->drawPantherTab(tabOpt, p, w);
}
}
break;
@@ -4812,10 +4598,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
// similar when I have an upside down scroll bar
// because on Tiger I only "fake" the reverse stuff.
bool reverseHorizontal = (slider->direction == Qt::RightToLeft
- && slider->orientation == Qt::Horizontal
- && (!slider->upsideDown
- || (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4
- && slider->upsideDown)));
+ && slider->orientation == Qt::Horizontal);
if ((reverseHorizontal
&& slider->activeSubControls == SC_ScrollBarAddLine)
|| (!reverseHorizontal
@@ -5196,12 +4979,6 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
bkind = kThemeBevelButton;
break;
case QAquaSizeMini:
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) && 0
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_3) {
- bkind = kThemeMiniBevelButton;
- break;
- }
-#endif
case QAquaSizeSmall:
bkind = kThemeSmallBevelButton;
break;
@@ -5450,11 +5227,7 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
cpc = sc == SC_ScrollBarSubLine ? kControlUpButtonPart
: kControlDownButtonPart;
if (slider->direction == Qt::RightToLeft
- && slider->orientation == Qt::Horizontal
- && (!slider->upsideDown
- || (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4
- && slider->upsideDown))
- ) {
+ && slider->orientation == Qt::Horizontal) {
if (cpc == kControlDownButtonPart)
cpc = kControlUpButtonPart;
else if (cpc == kControlUpButtonPart)
@@ -5772,11 +5545,6 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
case QStyle::CT_TabBarTab:
if (const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(opt)) {
- bool newStyleTabs =
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4 ? true :
-#endif
- false;
const QAquaWidgetSize AquaSize = d->aquaSizeConstrain(opt, widget);
const bool differentFont = (widget && widget->testAttribute(Qt::WA_SetFont))
|| !QApplication::desktopSettingsAware();
@@ -5784,86 +5552,61 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
bool vertTabs = ttd == kThemeTabWest || ttd == kThemeTabEast;
if (vertTabs)
sz.transpose();
- if (newStyleTabs) {
- int defaultTabHeight;
- int defaultExtraSpace = proxy()->pixelMetric(PM_TabBarTabHSpace, tab, widget); // Remove spurious gcc warning (AFAIK)
- QFontMetrics fm = opt->fontMetrics;
- switch (AquaSize) {
- case QAquaSizeUnknown:
- case QAquaSizeLarge:
- if (tab->documentMode)
- defaultTabHeight = 23;
- else
- defaultTabHeight = 21;
- break;
- case QAquaSizeSmall:
- defaultTabHeight = 18;
- break;
- case QAquaSizeMini:
- defaultTabHeight = 16;
- break;
- }
-
- bool setWidth = false;
- if (differentFont || !tab->icon.isNull()) {
- sz.rheight() = qMax(defaultTabHeight, sz.height());
- } else {
- QSize textSize = fm.size(Qt::TextShowMnemonic, tab->text);
- sz.rheight() = qMax(defaultTabHeight, textSize.height());
- sz.rwidth() = textSize.width() + defaultExtraSpace;
- setWidth = true;
- }
+ int defaultTabHeight;
+ int defaultExtraSpace = proxy()->pixelMetric(PM_TabBarTabHSpace, tab, widget); // Remove spurious gcc warning (AFAIK)
+ QFontMetrics fm = opt->fontMetrics;
+ switch (AquaSize) {
+ case QAquaSizeUnknown:
+ case QAquaSizeLarge:
+ if (tab->documentMode)
+ defaultTabHeight = 23;
+ else
+ defaultTabHeight = 21;
+ break;
+ case QAquaSizeSmall:
+ defaultTabHeight = 18;
+ break;
+ case QAquaSizeMini:
+ defaultTabHeight = 16;
+ break;
+ }
+ bool setWidth = false;
+ if (differentFont || !tab->icon.isNull()) {
+ sz.rheight() = qMax(defaultTabHeight, sz.height());
+ } else {
+ QSize textSize = fm.size(Qt::TextShowMnemonic, tab->text);
+ sz.rheight() = qMax(defaultTabHeight, textSize.height());
+ sz.rwidth() = textSize.width() + defaultExtraSpace;
+ setWidth = true;
+ }
- if (vertTabs)
- sz.transpose();
+ if (vertTabs)
+ sz.transpose();
- int maxWidgetHeight = qMax(tab->leftButtonSize.height(), tab->rightButtonSize.height());
- int maxWidgetWidth = qMax(tab->leftButtonSize.width(), tab->rightButtonSize.width());
+ int maxWidgetHeight = qMax(tab->leftButtonSize.height(), tab->rightButtonSize.height());
+ int maxWidgetWidth = qMax(tab->leftButtonSize.width(), tab->rightButtonSize.width());
- int widgetWidth = 0;
- int widgetHeight = 0;
- int padding = 0;
- if (tab->leftButtonSize.isValid()) {
- padding += 8;
- widgetWidth += tab->leftButtonSize.width();
- widgetHeight += tab->leftButtonSize.height();
- }
- if (tab->rightButtonSize.isValid()) {
- padding += 8;
- widgetWidth += tab->rightButtonSize.width();
- widgetHeight += tab->rightButtonSize.height();
- }
+ int widgetWidth = 0;
+ int widgetHeight = 0;
+ int padding = 0;
+ if (tab->leftButtonSize.isValid()) {
+ padding += 8;
+ widgetWidth += tab->leftButtonSize.width();
+ widgetHeight += tab->leftButtonSize.height();
+ }
+ if (tab->rightButtonSize.isValid()) {
+ padding += 8;
+ widgetWidth += tab->rightButtonSize.width();
+ widgetHeight += tab->rightButtonSize.height();
+ }
- if (vertTabs) {
- sz.setHeight(sz.height() + widgetHeight + padding);
- sz.setWidth(qMax(sz.width(), maxWidgetWidth));
- } else {
- if (setWidth)
- sz.setWidth(sz.width() + widgetWidth + padding);
- sz.setHeight(qMax(sz.height(), maxWidgetHeight));
- }
+ if (vertTabs) {
+ sz.setHeight(sz.height() + widgetHeight + padding);
+ sz.setWidth(qMax(sz.width(), maxWidgetWidth));
} else {
- SInt32 tabh = sz.height();
- SInt32 overlap = 0;
- switch (AquaSize) {
- default:
- case QAquaSizeUnknown:
- case QAquaSizeLarge:
- GetThemeMetric(kThemeLargeTabHeight, &tabh);
- GetThemeMetric(kThemeMetricTabFrameOverlap, &overlap);
- break;
- case QAquaSizeMini:
- GetThemeMetric(kThemeMetricMiniTabHeight, &tabh);
- GetThemeMetric(kThemeMetricMiniTabFrameOverlap, &overlap);
- break;
- case QAquaSizeSmall:
- GetThemeMetric(kThemeSmallTabHeight, &tabh);
- GetThemeMetric(kThemeMetricSmallTabFrameOverlap, &overlap);
- break;
- }
- tabh += overlap;
- if (sz.height() < tabh)
- sz.rheight() = tabh;
+ if (setWidth)
+ sz.setWidth(sz.width() + widgetWidth + padding);
+ sz.setHeight(qMax(sz.height(), maxWidgetHeight));
}
}
break;
@@ -6152,11 +5895,9 @@ QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const Q
case SP_TrashIcon:
iconType = kTrashIcon;
break;
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
case SP_ComputerIcon:
iconType = kComputerIcon;
break;
-#endif
case SP_DriveFDIcon:
iconType = kGenericFloppyIcon;
break;
diff --git a/src/gui/styles/qmacstylepixmaps_mac_p.h b/src/gui/styles/qmacstylepixmaps_mac_p.h
index 0754508..eacd6bd 100644
--- a/src/gui/styles/qmacstylepixmaps_mac_p.h
+++ b/src/gui/styles/qmacstylepixmaps_mac_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,1406 +50,6 @@
// We mean it.
//
-static const char *const qt_mac_tabnrm_left[]={
-"6 22 71 2",
-"#a c #5f5f5f",
-"## c #6d6d6d",
-".c c #737373",
-".d c #757575",
-".b c #7c7c7c",
-".n c #7d7d7d",
-".r c #828282",
-".f c #838383",
-"#. c #878787",
-".7 c #8c8c8c",
-".v c #8e8e8e",
-".4 c #939393",
-".1 c #969696",
-".j c #979797",
-".a c #9a9a9a",
-".6 c #9b9b9b",
-".A c #a0a0a0",
-".Z c #a6a6a6",
-".C c #aaaaaa",
-".3 c #aeaeae",
-".E c #afafaf",
-".J c #b3b3b3",
-".8 c #b7b7b7",
-".o c #b8b8b8",
-".g c #b9b9b9",
-".P c #bcbcbc",
-".R c #bfbfbf",
-".T c #c2c2c2",
-".s c #c4c4c4",
-"#e c #c6c6c6",
-".V c #c7c7c7",
-".w c #c9c9c9",
-".B c #cacaca",
-"#d c #cbcbcb",
-".z c #cecece",
-".F c #cfcfcf",
-".5 c #d1d1d1",
-"#c c #d3d3d3",
-".K c #d4d4d4",
-".G c #d5d5d5",
-".Q c #d6d6d6",
-".S c #d8d8d8",
-".U c #dadada",
-".2 c #dbdbdb",
-".L c #dcdcdc",
-".H c #dedede",
-".I c #dfdfdf",
-".M c #e0e0e0",
-".X c #e1e1e1",
-".D c #e2e2e2",
-"#b c #e3e3e3",
-".O c #e4e4e4",
-".N c #e6e6e6",
-".9 c #e7e7e7",
-".e c #e8e8e8",
-".# c #e9e9e9",
-".t c #ebebeb",
-"Qt c #ececec",
-".p c #ededed",
-".x c #eeeeee",
-".y c #efefef",
-".u c #f1f1f1",
-".k c #f2f2f2",
-".q c #f3f3f3",
-".W c #f6f6f6",
-".l c #f7f7f7",
-".m c #f8f8f8",
-".Y c #f9f9f9",
-".h c #fcfcfc",
-".i c #fdfdfd",
-".0 c #ffffff",
-"Qt.#.a.b.c.d",
-".e.f.gQt.h.i",
-".j.a.k.l.m.m",
-".n.o.p.k.q.q",
-".r.s.t.u.u.u",
-".v.w.t.x.y.y",
-".a.z.#.p.x.x",
-".A.B.#.t.x.p",
-".C.B.D.t.x.x",
-".E.F.G.H.I.I",
-".J.K.L.M.N.O",
-".P.Q.D.#.e.#",
-".R.S.O.p.x.p",
-".T.U.#.u.u.k",
-".V.I.t.q.W.W",
-".P.X.k.W.Y.Y",
-".Z.M.u.Y.0.0",
-".1.2.l.0.0.0",
-".3.4.m.0.0.0",
-".5.6.7.8.9.0",
-".X.5.3#.###a",
-".O#b.L#c#d#e"};
-
-static const char *const qt_mac_tabnrm_mid[]={
-"6 22 18 1",
-"n c #585858",
-". c #777777",
-"p c #c2c2c2",
-"o c #c3c3c3",
-"g c #dedede",
-"h c #e5e5e5",
-"i c #e8e8e8",
-"f c #ededed",
-"e c #eeeeee",
-"d c #efefef",
-"c c #f1f1f1",
-"b c #f3f3f3",
-"j c #f6f6f6",
-"a c #f8f8f8",
-"k c #f9f9f9",
-"# c #fdfdfd",
-"l c #fefefe",
-"m c #ffffff",
-"......",
-"######",
-"aaaaaa",
-"bbbbbb",
-"cccccc",
-"dddddd",
-"eeeeee",
-"ffffff",
-"eeeeee",
-"gggggg",
-"hhhhhh",
-"iiiiii",
-"eeeeee",
-"cccccc",
-"jjjjjj",
-"kkkkkk",
-"llllll",
-"mmmmmm",
-"mmmmmm",
-"mmmmmm",
-"nnnnnn",
-"oppooo"};
-
-static const char *const qt_mac_tabnrm_right[]={
-"6 22 70 2",
-".9 c #5f5f5f",
-"#. c #6d6d6d",
-".# c #747474",
-"Qt c #757575",
-".a c #7c7c7c",
-".p c #7d7d7d",
-".t c #828282",
-".h c #838383",
-"## c #888888",
-".6 c #8c8c8c",
-".x c #8e8e8e",
-".3 c #929292",
-".2 c #969696",
-".l c #979797",
-".b c #9a9a9a",
-".7 c #9b9b9b",
-".A c #a0a0a0",
-".0 c #a6a6a6",
-".C c #aaaaaa",
-"#a c #aeaeae",
-".H c #afafaf",
-".N c #b3b3b3",
-".5 c #b7b7b7",
-".o c #b8b8b8",
-".g c #b9b9b9",
-".Q c #bcbcbc",
-".S c #bfbfbf",
-".U c #c2c2c2",
-".s c #c4c4c4",
-"#b c #c6c6c6",
-".W c #c7c7c7",
-".w c #c9c9c9",
-".z c #cacaca",
-".y c #cecece",
-".G c #cfcfcf",
-".8 c #d1d1d1",
-"#c c #d3d3d3",
-".M c #d4d4d4",
-".F c #d5d5d5",
-".P c #d6d6d6",
-".R c #d8d8d8",
-".T c #dadada",
-".1 c #dbdbdb",
-".L c #dcdcdc",
-".E c #dedede",
-".D c #dfdfdf",
-".K c #e0e0e0",
-".Y c #e1e1e1",
-".B c #e2e2e2",
-".I c #e4e4e4",
-"#d c #e5e5e5",
-".J c #e6e6e6",
-".4 c #e7e7e7",
-".O c #e8e8e8",
-".c c #e9e9e9",
-".r c #ebebeb",
-".d c #ececec",
-".n c #ededed",
-".v c #eeeeee",
-".u c #efefef",
-".q c #f1f1f1",
-".k c #f2f2f2",
-".m c #f3f3f3",
-".V c #f6f6f6",
-".j c #f7f7f7",
-".i c #f8f8f8",
-".X c #f9f9f9",
-".f c #fcfcfc",
-".e c #fdfdfd",
-".Z c #ffffff",
-"Qt.#.a.b.c.d",
-".e.f.d.g.h.c",
-".i.i.j.k.b.l",
-".m.m.k.n.o.p",
-".q.q.q.r.s.t",
-".u.u.v.r.w.x",
-".v.v.n.c.y.b",
-".n.v.r.c.z.A",
-".v.v.r.B.z.C",
-".D.D.E.F.G.H",
-".I.J.K.L.M.N",
-".c.O.c.B.P.Q",
-".n.v.n.I.R.S",
-".k.q.q.c.T.U",
-".V.V.m.r.D.W",
-".X.X.V.k.Y.Q",
-".Z.Z.X.q.K.0",
-".Z.Z.Z.j.1.2",
-".Z.Z.Z.i.3.H",
-".Z.4.5.6.7.8",
-".9#.###a.8.B",
-"#b.z#c.L.I#d"};
-
-static const char *const qt_mac_tabselected_active_left[]={
-"6 22 130 2",
-".d c #000069",
-".C c #0042b4",
-".I c #0157bb",
-".w c #0c28a0",
-".l c #101094",
-".O c #1163c4",
-".c c #1a1a6e",
-".U c #1e6ec9",
-".r c #214eb7",
-".x c #256cc9",
-".0 c #2877ce",
-".6 c #347fd1",
-".D c #3981d2",
-"#a c #3a81d2",
-"#g c #418ad7",
-".J c #4288d4",
-".q c #45459b",
-".V c #458cd5",
-".g c #46469f",
-".P c #4a8dd7",
-".1 c #4a90db",
-"#m c #4b91db",
-"#s c #4e91dc",
-"#y c #4f8dcd",
-".7 c #5195df",
-".b c #525280",
-"#E c #5984b2",
-"#b c #5b9be1",
-"#R c #5c7e9f",
-".2 c #5d9de6",
-"#5 c #5f5f5f",
-"#Y c #627c8d",
-"#h c #65a4e7",
-".3 c #65a6e8",
-".8 c #67a6eb",
-"#n c #69a6e8",
-"#c c #6cabed",
-"#4 c #6d6d6d",
-".4 c #6dacee",
-".5 c #6eabee",
-"#K c #6f87a1",
-"#L c #70aff1",
-".9 c #70aff2",
-"#t c #71aced",
-"#z c #72afee",
-"#F c #72afef",
-".f c #757592",
-"#i c #75b3f4",
-"#d c #75b4f3",
-"#Z c #77a6b3",
-"#. c #77b1f4",
-"## c #7ab4f4",
-".W c #7cb0e7",
-"#o c #7cb8f9",
-"#f c #80bdf9",
-"#e c #81bbf9",
-"#j c #81bbfc",
-"#u c #86c1ff",
-"#3 c #878787",
-"#k c #89c2fd",
-"#A c #89c3ff",
-".Q c #8bb9e8",
-"#l c #8bc4ff",
-"#p c #8bc6ff",
-"#G c #8dc7ff",
-".K c #8ebae8",
-"#S c #8ecbff",
-"#q c #91c8ff",
-"#M c #92ccff",
-"#v c #93ccff",
-".k c #9494b0",
-"#r c #94caff",
-".E c #96bde8",
-".X c #96c3ee",
-"#w c #96cfff",
-"#B c #97cfff",
-".Y c #99c4ee",
-"#x c #99d0ff",
-".a c #9a9aa4",
-"#X c #9b9b9b",
-".s c #9bbee8",
-".R c #9bc4ee",
-".T c #9cc5ee",
-".Z c #9dc7ef",
-"#C c #9dd3ff",
-".y c #9ec3e8",
-".L c #9ec3ed",
-".M c #9ec5ed",
-"#H c #9ed6ff",
-".S c #9fc5ee",
-"#D c #a1d7ff",
-".N c #a3c8ed",
-"#N c #a3daff",
-".F c #a5c8ed",
-".G c #a7c9ed",
-"#J c #a7ddff",
-"#I c #a7deff",
-".H c #a8caee",
-"#T c #a8e0ff",
-"#0 c #a8e2e6",
-".z c #a9caed",
-"#O c #abe3ff",
-".A c #adcbed",
-"#P c #ade3ff",
-"#Q c #aeaeae",
-".m c #afbbe7",
-".B c #afccee",
-"#U c #b0e9ff",
-".t c #b3d1ed",
-"#V c #b5ebff",
-".u c #bad4ee",
-".v c #bbd4ef",
-".h c #bfc2e8",
-"#1 c #bffdff",
-"a# c #c6c6c6",
-"a. c #cbcbcb",
-".n c #cbddf2",
-".o c #cce0f3",
-".p c #cfe1f4",
-"#W c #d1d1d1",
-"#9 c #d3d3d3",
-"#8 c #dcdcdc",
-"#2 c #e1e1e1",
-"#7 c #e3e3e3",
-"#6 c #e4e4e4",
-".i c #e6e9f6",
-".e c #e8e8e8",
-".# c #e9e9e9",
-".j c #e9edf8",
-"Qt c #ececec",
-"Qt.#.a.b.c.d",
-".e.f.g.h.i.j",
-".k.l.m.n.o.p",
-".q.r.s.t.u.v",
-".w.x.y.z.A.B",
-".C.D.E.F.G.H",
-".I.J.K.L.M.N",
-".O.P.Q.R.S.T",
-".U.V.W.X.Y.Z",
-".0.1.2.3.4.5",
-".6.7.8.9#.##",
-"#a#b#c#d#e#f",
-"#g#h#i#j#k#l",
-"#m#n#o#p#q#r",
-"#s#t#u#v#w#x",
-"#y#z#A#B#C#D",
-"#E#F#G#H#I#J",
-"#K#L#M#N#O#P",
-"#Q#R#S#T#U#V",
-"#W#X#Y#Z#0#1",
-"#2#W#Q#3#4#5",
-"#6#7#8#9a.a#"};
-
-static const char *const qt_mac_tabselected_active_mid[]={
-"6 22 23 1",
-". c #00006d",
-"s c #585858",
-"h c #70adef",
-"i c #7bb5f5",
-"j c #83bcf9",
-"k c #8bc3ff",
-"l c #93c9ff",
-"m c #9ad1ff",
-"f c #9ec5ef",
-"g c #9ec7f0",
-"n c #a0d6ff",
-"e c #a2c7ed",
-"d c #a8caee",
-"o c #a8deff",
-"p c #ade2ff",
-"c c #afceee",
-"q c #b6ecff",
-"b c #bbd5f0",
-"r c #c1feff",
-"u c #c2c2c2",
-"t c #c3c3c3",
-"a c #cfe1f3",
-"# c #e9edf8",
-"......",
-"######",
-"aaaaaa",
-"bbbbbb",
-"cccccc",
-"dddddd",
-"eeeeee",
-"ffffff",
-"gggggg",
-"hhhhhh",
-"iiiiii",
-"jjjjjj",
-"kkkkkk",
-"llllll",
-"mmmmmm",
-"nnnnnn",
-"oooooo",
-"pppppp",
-"qqqqqq",
-"rrrrrr",
-"ssssss",
-"ttttuu"};
-
-static const char *const qt_mac_tabselected_active_right[]={
-"6 22 128 2",
-"Qt c #000069",
-".G c #0042b4",
-".M c #0157bb",
-".A c #0c28a0",
-".n c #101094",
-".S c #1163c4",
-".# c #1b1b6e",
-".Y c #1e6ec9",
-".t c #214eb7",
-".z c #256cc9",
-".4 c #2877ce",
-"#. c #347fd1",
-".F c #3981d2",
-"#e c #3a81d2",
-"#k c #418ad7",
-".L c #4288d4",
-".u c #45459b",
-".X c #458cd5",
-".h c #46469f",
-".R c #4a8dd7",
-".3 c #4a90db",
-"#q c #4b91db",
-"#w c #4e91dc",
-"#C c #4f8dcd",
-".9 c #5195df",
-".a c #525280",
-"#I c #5984b2",
-"#T c #5b7d9f",
-"#d c #5b9be1",
-".2 c #5d9de6",
-"#1 c #5f5f5f",
-"#Y c #627c8d",
-"#j c #65a4e7",
-".1 c #65a6e8",
-".8 c #67a6eb",
-"#p c #69a6e8",
-"#c c #6cabed",
-"#2 c #6d6d6d",
-".0 c #6dacee",
-".Z c #6eabee",
-"#O c #6f87a1",
-"#N c #70aff1",
-".7 c #70aff2",
-"#v c #71aced",
-"#B c #72afee",
-"#H c #72afef",
-".i c #757592",
-"#i c #75b3f4",
-"#b c #75b4f3",
-"#X c #77a6b3",
-".6 c #77b1f4",
-".5 c #7ab4f4",
-".W c #7cb0e7",
-"#o c #7cb8f9",
-"## c #80bdf9",
-"#a c #81bbf9",
-"#h c #81bbfc",
-"#u c #86c1ff",
-"#3 c #888888",
-"#g c #89c2fd",
-"#A c #89c3ff",
-".Q c #8bb9e8",
-"#f c #8bc4ff",
-"#n c #8bc6ff",
-"#G c #8dc7ff",
-".K c #8ebae8",
-"#S c #8ecbff",
-"#m c #91c8ff",
-"#M c #92ccff",
-"#t c #93ccff",
-".o c #9494b0",
-"#l c #94caff",
-".E c #96bde8",
-".V c #96c3ee",
-"#s c #96cfff",
-"#z c #97cfff",
-".U c #99c4ee",
-"#r c #99d0ff",
-".b c #9a9aa4",
-"#Z c #9b9b9b",
-".s c #9bbee8",
-".P c #9bc4ee",
-".N c #9cc5ee",
-".T c #9dc7ef",
-"#y c #9dd3ff",
-".y c #9ec3e8",
-".J c #9ec3ed",
-".I c #9ec5ed",
-"#F c #9ed6ff",
-".O c #9fc5ee",
-"#x c #a1d7ff",
-".H c #a3c8ed",
-"#L c #a3daff",
-".D c #a5c8ed",
-".C c #a7c9ed",
-"#D c #a7ddff",
-"#E c #a7deff",
-".B c #a8caee",
-"#R c #a8e0ff",
-"#W c #a8e2e6",
-".x c #a9caed",
-"#K c #abe3ff",
-".w c #adcbed",
-"#J c #ade3ff",
-"#U c #aeaeae",
-".m c #afbbe7",
-".v c #afccee",
-"#Q c #b0e9ff",
-".r c #b3d1ed",
-"#P c #b5ebff",
-".q c #bad4ee",
-".p c #bbd4ef",
-".g c #bfc2e8",
-"#V c #bffdff",
-"#5 c #c6c6c6",
-"#6 c #cacaca",
-".l c #cbddf2",
-".k c #cce0f3",
-".j c #cfe1f4",
-"#0 c #d1d1d1",
-"#7 c #d3d3d3",
-"#8 c #dcdcdc",
-"#4 c #e2e2e2",
-"#9 c #e4e4e4",
-".f c #e6e9f6",
-".c c #e9e9e9",
-".e c #e9edf8",
-".d c #ececec",
-"Qt.#.a.b.c.d",
-".e.f.g.h.i.c",
-".j.k.l.m.n.o",
-".p.q.r.s.t.u",
-".v.w.x.y.z.A",
-".B.C.D.E.F.G",
-".H.I.J.K.L.M",
-".N.O.P.Q.R.S",
-".T.U.V.W.X.Y",
-".Z.0.1.2.3.4",
-".5.6.7.8.9#.",
-"###a#b#c#d#e",
-"#f#g#h#i#j#k",
-"#l#m#n#o#p#q",
-"#r#s#t#u#v#w",
-"#x#y#z#A#B#C",
-"#D#E#F#G#H#I",
-"#J#K#L#M#N#O",
-"#P#Q#R#S#T#U",
-"#V#W#X#Y#Z#0",
-"#1#2#3#U#0#4",
-"#5#6#7#8#9#9"};
-
-static const char *const qt_mac_tabselected_inactive_left[]={
-"6 22 64 1",
-"9 c #656565",
-"8 c #737373",
-"c c #767676",
-"b c #808080",
-"n c #818181",
-"q c #828282",
-"e c #888888",
-"7 c #8b8b8b",
-"u c #8d8d8d",
-"3 c #939393",
-"k c #979797",
-"0 c #989898",
-"j c #9b9b9b",
-"A c #9d9d9d",
-"a c #9e9e9e",
-"4 c #9f9f9f",
-"Y c #a3a3a3",
-"C c #a6a6a6",
-"E c #aaaaaa",
-"J c #aeaeae",
-"6 c #b0b0b0",
-"2 c #b1b1b1",
-"o c #b2b2b2",
-"f c #b3b3b3",
-"O c #b6b6b6",
-"Q c #b9b9b9",
-"S c #bbbbbb",
-"r c #bdbdbd",
-"U c #c0c0c0",
-"v c #c2c2c2",
-"B c #c3c3c3",
-"y c #c6c6c6",
-"F c #c7c7c7",
-"K c #cccccc",
-"G c #cdcdcd",
-"R c #cfcfcf",
-"T c #d1d1d1",
-"1 c #d2d2d2",
-"L c #d3d3d3",
-"H c #d5d5d5",
-"I c #d6d6d6",
-"W c #d7d7d7",
-"D c #d8d8d8",
-"N c #dadada",
-"M c #dcdcdc",
-"5 c #dddddd",
-"P c #dedede",
-"z c #dfdfdf",
-"s c #e0e0e0",
-"g c #e1e1e1",
-"p c #e2e2e2",
-"w c #e3e3e3",
-"x c #e4e4e4",
-"t c #e6e6e6",
-"l c #e7e7e7",
-"d c #e8e8e8",
-"# c #e9e9e9",
-"V c #eaeaea",
-"m c #ebebeb",
-". c #ececec",
-"X c #ededed",
-"h c #f0f0f0",
-"i c #f1f1f1",
-"Z c #f2f2f2",
-".#abcc",
-"defghi",
-"jklm..",
-"nopldd",
-"qrsttt",
-"uvswxx",
-"kyzpww",
-"ABzswp",
-"CBDsww",
-"EFGHII",
-"JKLIMN",
-"OGDzPz",
-"QRNpwp",
-"STzttl",
-"UIsdVV",
-"OWlVXX",
-"YItXZZ",
-"01mZZZ",
-"23.ZZZ",
-"T4uo5Z",
-"gT6789",
-"xwMLKF"};
-
-static const char *const qt_mac_tabselected_inactive_mid[]={
-"6 22 17 1",
-"m c #5f5f5f",
-". c #787878",
-"o c #c3c3c3",
-"n c #c4c4c4",
-"g c #d5d5d5",
-"h c #dbdbdb",
-"i c #dedede",
-"f c #e2e2e2",
-"e c #e3e3e3",
-"d c #e4e4e4",
-"c c #e6e6e6",
-"b c #e8e8e8",
-"j c #eaeaea",
-"a c #ececec",
-"k c #ededed",
-"# c #f1f1f1",
-"l c #f2f2f2",
-"......",
-"######",
-"aaaaaa",
-"bbbbbb",
-"cccccc",
-"dddddd",
-"eeeeee",
-"ffffff",
-"eeeeee",
-"gggggg",
-"hhhhhh",
-"iiiiii",
-"eeeeee",
-"cccccc",
-"jjjjjj",
-"kkkkkk",
-"llllll",
-"llllll",
-"llllll",
-"llllll",
-"mmmmmm",
-"nnnnno"};
-
-static const char *const qt_mac_tabselected_inactive_right[]={
-"6 22 65 2",
-".6 c #656565",
-".7 c #737373",
-"Qt c #767676",
-".# c #808080",
-".p c #818181",
-".t c #828282",
-".h c #888888",
-".8 c #8c8c8c",
-".x c #8d8d8d",
-".2 c #929292",
-".k c #979797",
-".1 c #989898",
-".l c #9b9b9b",
-".B c #9d9d9d",
-".a c #9e9e9e",
-".5 c #9f9f9f",
-".Z c #a3a3a3",
-".D c #a6a6a6",
-".I c #aaaaaa",
-".N c #aeaeae",
-".9 c #b0b0b0",
-".3 c #b1b1b1",
-".o c #b2b2b2",
-".g c #b3b3b3",
-".P c #b6b6b6",
-".R c #b9b9b9",
-".T c #bbbbbb",
-".s c #bdbdbd",
-".V c #c0c0c0",
-".w c #c2c2c2",
-".A c #c3c3c3",
-".z c #c6c6c6",
-".H c #c7c7c7",
-"#. c #cbcbcb",
-".M c #cccccc",
-".G c #cdcdcd",
-".Q c #cfcfcf",
-".S c #d1d1d1",
-".0 c #d2d2d2",
-".L c #d3d3d3",
-".F c #d5d5d5",
-".E c #d6d6d6",
-".X c #d7d7d7",
-".C c #d8d8d8",
-".J c #dadada",
-".K c #dcdcdc",
-".4 c #dddddd",
-".O c #dedede",
-".y c #dfdfdf",
-".r c #e0e0e0",
-".f c #e1e1e1",
-".n c #e2e2e2",
-".v c #e3e3e3",
-".u c #e4e4e4",
-".q c #e6e6e6",
-".j c #e7e7e7",
-".m c #e8e8e8",
-".b c #e9e9e9",
-".U c #eaeaea",
-".i c #ebebeb",
-".c c #ececec",
-".W c #ededed",
-".e c #f0f0f0",
-".d c #f1f1f1",
-".Y c #f2f2f2",
-"QtQt.#.a.b.c",
-".d.e.f.g.h.b",
-".c.c.i.j.k.l",
-".m.m.j.n.o.p",
-".q.q.q.r.s.t",
-".u.u.v.r.w.x",
-".v.v.n.y.z.k",
-".n.v.r.y.A.B",
-".v.v.r.C.A.D",
-".E.E.F.G.H.I",
-".J.K.E.L.M.N",
-".y.O.y.C.G.P",
-".n.v.n.J.Q.R",
-".j.q.q.y.S.T",
-".U.U.m.r.E.V",
-".W.W.U.j.X.P",
-".Y.Y.W.q.E.Z",
-".Y.Y.Y.i.0.1",
-".Y.Y.Y.c.2.3",
-".Y.4.o.x.5.S",
-".6.7.8.9.S.n",
-".H#..L.K.u.u"};
-
-static const char * const qt_mac_tab_selected_active_graph_left[]={
-"6 22 126 2",
-".d c #15283d",
-".c c #283348",
-".w c #374459",
-".l c #435364",
-".B c #465568",
-".q c #4d5367",
-".b c #525763",
-".H c #536271",
-".N c #5d6a79",
-"#1 c #5f5f5f",
-".T c #647181",
-"#N c #656e77",
-".r c #677282",
-"#B c #687380",
-"#U c #697077",
-".Z c #6c7885",
-".5 c #6c7988",
-"#0 c #6d6d6d",
-"#H c #6f767f",
-".x c #727e8a",
-"## c #757f8d",
-".f c #76767d",
-"#v c #76838f",
-"#e c #778292",
-"#k c #7b8694",
-".U c #7b8794",
-".C c #7b8795",
-".O c #7c8893",
-".I c #7d8896",
-".g c #7e8895",
-".0 c #7e8b99",
-"#q c #818c98",
-".6 c #85909e",
-"#Z c #878787",
-"#a c #8a96a3",
-"#f c #8d99a7",
-".1 c #8e99a6",
-"#V c #929ca5",
-"#l c #939daa",
-".k c #949499",
-".7 c #96a0ad",
-".2 c #98a3af",
-"#r c #99a5b0",
-".a c #9a9a9b",
-"#I c #9aa4b1",
-"#T c #9b9b9b",
-".3 c #9ba6b1",
-"#b c #9ba6b3",
-".8 c #9ca7b4",
-".4 c #9da6b1",
-"#w c #9da7b5",
-"#C c #9ea9b5",
-".V c #a0a9b4",
-"#g c #a0abb8",
-"#. c #a3acb8",
-".9 c #a4adba",
-"#c c #a6afbc",
-"#m c #a8b1bd",
-"#d c #a9b3bf",
-".J c #abb3bc",
-".P c #adb4bb",
-"#h c #adb8c3",
-"#M c #aeaeae",
-"#j c #aeb8c4",
-".W c #b0b8c2",
-"#i c #b0bac6",
-".D c #b3bac3",
-"#x c #b3bcc8",
-"#n c #b3bdc9",
-".Q c #b4bac2",
-"#D c #b5bfc9",
-".y c #b6bdc5",
-"#o c #b6becb",
-"#s c #b7c2ce",
-".K c #b8bdc6",
-".X c #b8bfc8",
-"#p c #b8c1ce",
-".S c #b9bec7",
-".R c #b9bfc8",
-".Y c #b9c1c7",
-".M c #b9c1c8",
-"#J c #bac5cf",
-".L c #bbbfc8",
-"#O c #bbc7d4",
-".s c #bcc3ca",
-"#t c #bcc5d1",
-"#u c #bcc6d2",
-".E c #bdc3ca",
-"#y c #bdc7d2",
-".G c #bec3cb",
-".F c #bec5cb",
-".z c #c2c7ce",
-"#E c #c2cad6",
-".A c #c3c9d0",
-"#z c #c3ccd7",
-"#A c #c3ced7",
-".m c #c5c9d0",
-"#7 c #c6c6c6",
-"#K c #c7d2dd",
-".t c #c8ced3",
-"#F c #c8d3de",
-"#G c #c9d3df",
-"#6 c #cbcbcb",
-".u c #cbd1d6",
-".v c #ccd2d7",
-".h c #ced2d6",
-"#W c #ced8e4",
-"#L c #d0dae3",
-"#S c #d1d1d1",
-"#P c #d1dbe6",
-"#5 c #d3d3d3",
-".n c #d5dadc",
-"#Q c #d5deea",
-".o c #d7dbdf",
-"#R c #d7e1ec",
-".p c #dadde0",
-"#4 c #dcdcdc",
-".i c #e0e2e6",
-"#Y c #e1e1e1",
-"#3 c #e3e3e3",
-"#2 c #e4e4e4",
-".j c #e6e8ea",
-".e c #e8e8e8",
-".# c #e9e9e9",
-"#X c #e9f4ff",
-"Qt c #ececec",
-"Qt.#.a.b.c.d",
-".e.f.g.h.i.j",
-".k.l.m.n.o.p",
-".q.r.s.t.u.v",
-".w.x.y.z.A.A",
-".B.C.D.E.F.G",
-".H.I.J.K.L.M",
-".N.O.P.Q.R.S",
-".T.U.V.W.X.Y",
-".Z.0.1.2.3.4",
-".5.6.7.8.9#.",
-"###a#b#c#d#d",
-"#e#f#g#h#i#j",
-"#k#l#m#n#o#p",
-"#q#r#h#s#t#u",
-"#v#w#x#y#z#A",
-"#B#C#D#E#F#G",
-"#H#I#J#K#L#L",
-"#M#N#O#P#Q#R",
-"#S#T#U#V#W#X",
-"#Y#S#M#Z#0#1",
-"#2#3#4#5#6#7"};
-
-static const char * const qt_mac_tab_selected_active_graph_mid[]={
-"6 22 41 1",
-". c #15273d",
-"# c #16283e",
-"a c #17293e",
-"b c #192a3f",
-"c c #1a2b40",
-"K c #585858",
-"p c #9ea8b4",
-"q c #a4adb9",
-"r c #aab4bf",
-"s c #afb9c6",
-"o c #b6bcc6",
-"n c #b8bec6",
-"t c #b8c2ce",
-"m c #bbc2c8",
-"u c #bbc5d0",
-"l c #bec4cb",
-"v c #bfcad4",
-"L c #c2c2c2",
-"k c #c2c9ce",
-"M c #c3c3c3",
-"w c #c7d1dd",
-"i c #cad0d5",
-"j c #cbd0d5",
-"x c #ccd5e1",
-"y c #cdd6e2",
-"z c #ced6e2",
-"A c #d5dfeb",
-"B c #d6e0ec",
-"C c #d7e1ed",
-"e c #d8dbe0",
-"f c #d8dce0",
-"g c #d9dce0",
-"D c #d9e2ee",
-"h c #dadce0",
-"E c #dae2ef",
-"d c #e7e9eb",
-"J c #e9f2ff",
-"I c #eaf3ff",
-"H c #ebf5ff",
-"G c #ecf6ff",
-"F c #edf6ff",
-"..#abc",
-"dddddd",
-"eeefgh",
-"iiiiij",
-"kkkkkk",
-"llllll",
-"mmmmmm",
-"nnnnnn",
-"oooooo",
-"pppppp",
-"qqqqqq",
-"rrrrrr",
-"ssssss",
-"tttttt",
-"uuuuuu",
-"vvvvvv",
-"wwwwww",
-"xxxxyz",
-"AABCDE",
-"FFGHIJ",
-"KKKKKK",
-"LLLLMM"};
-
-static const char * const qt_mac_tab_selected_active_graph_right[]={
-"6 22 124 2",
-"Qt c #15283d",
-".# c #293448",
-".z c #374459",
-".n c #435364",
-".F c #465568",
-".u c #4d5367",
-".a c #525763",
-".L c #536271",
-".R c #5d6a79",
-"#X c #5f5f5f",
-"#P c #646d77",
-".X c #647181",
-".t c #677282",
-"#F c #687380",
-"#U c #697077",
-".3 c #6c7885",
-".9 c #6c7988",
-"#Y c #6d6d6d",
-"#K c #6f767f",
-".y c #727e8a",
-"#c c #757f8d",
-".i c #76767d",
-"#z c #76838f",
-"#i c #778292",
-"#o c #7b8694",
-".W c #7b8794",
-".E c #7b8795",
-".Q c #7c8893",
-".K c #7d8896",
-".h c #7e8895",
-".2 c #7e8b99",
-"#t c #818c98",
-".8 c #85909e",
-"#Z c #888888",
-"#b c #8a96a3",
-"#h c #8d99a7",
-".1 c #8e99a6",
-"#T c #929ca5",
-"#n c #939daa",
-".o c #949499",
-".7 c #96a0ad",
-".0 c #98a3af",
-"#s c #99a5b0",
-".b c #9a9a9b",
-"#J c #9aa4b1",
-"#V c #9b9b9b",
-".Z c #9ba6b1",
-"#a c #9ba6b3",
-".6 c #9ca7b4",
-".Y c #9da6b1",
-"#y c #9da7b5",
-"#E c #9ea9b5",
-".V c #a0a9b4",
-"#g c #a0abb8",
-".4 c #a3acb8",
-".5 c #a4adba",
-"## c #a6afbc",
-"#m c #a8b1bd",
-"#. c #a9b3bf",
-".J c #abb3bc",
-".P c #adb4bb",
-"#f c #adb8c3",
-"#Q c #aeaeae",
-"#d c #aeb8c4",
-".U c #b0b8c2",
-"#e c #b0bac6",
-".D c #b3bac3",
-"#x c #b3bcc8",
-"#l c #b3bdc9",
-".O c #b4bac2",
-"#D c #b5bfc9",
-".x c #b6bdc5",
-"#k c #b6becb",
-"#r c #b7c2ce",
-".I c #b8bdc6",
-".T c #b8bfc8",
-"#j c #b8c1ce",
-".M c #b9bec7",
-".N c #b9bfc8",
-".S c #b9c1c7",
-".G c #b9c1c8",
-"#I c #bac5cf",
-".H c #bbbfc8",
-"#O c #bbc7d4",
-".s c #bcc3ca",
-"#q c #bcc5d1",
-"#p c #bcc6d2",
-".C c #bdc3ca",
-"#w c #bdc7d2",
-".A c #bec3cb",
-".B c #bec5cb",
-".w c #c2c7ce",
-"#C c #c2cad6",
-".v c #c3c9d0",
-"#v c #c3ccd7",
-"#u c #c3ced7",
-".m c #c5c9d0",
-"#1 c #c6c6c6",
-"#H c #c7d2dd",
-".r c #c8ced3",
-"#B c #c8d3de",
-"#A c #c9d3df",
-"#2 c #cacaca",
-".q c #cbd1d6",
-".p c #ccd2d7",
-".g c #ced2d6",
-"#S c #ced8e4",
-"#G c #d0dae3",
-"#W c #d1d1d1",
-"#N c #d1dbe6",
-"#3 c #d3d3d3",
-".l c #d5dadc",
-"#M c #d5deea",
-".k c #d7dbdf",
-"#L c #d7e1ec",
-".j c #dadde0",
-"#4 c #dcdcdc",
-".f c #e0e2e6",
-"#0 c #e2e2e2",
-"#5 c #e4e4e4",
-".e c #e6e8ea",
-".c c #e9e9e9",
-"#R c #e9f4ff",
-".d c #ececec",
-"Qt.#.a.b.c.d",
-".e.f.g.h.i.c",
-".j.k.l.m.n.o",
-".p.q.r.s.t.u",
-".v.v.w.x.y.z",
-".A.B.C.D.E.F",
-".G.H.I.J.K.L",
-".M.N.O.P.Q.R",
-".S.T.U.V.W.X",
-".Y.Z.0.1.2.3",
-".4.5.6.7.8.9",
-"#.#.###a#b#c",
-"#d#e#f#g#h#i",
-"#j#k#l#m#n#o",
-"#p#q#r#f#s#t",
-"#u#v#w#x#y#z",
-"#A#B#C#D#E#F",
-"#G#G#H#I#J#K",
-"#L#M#N#O#P#Q",
-"#R#S#T#U#V#W",
-"#X#Y#Z#Q#W#0",
-"#1#2#3#4#5#5"};
-
-static const char * const qt_mac_tab_press_left[]={
-"6 22 65 2",
-".8 c #5c5c5c",
-".c c #696969",
-".d c #6a6a6a",
-".b c #767676",
-".f c #7e7e7e",
-".t c #808080",
-".4 c #828282",
-".7 c #838383",
-".2 c #888888",
-".k c #8b8b8b",
-".0 c #8c8c8c",
-".z c #909090",
-".j c #919191",
-".a c #959595",
-".Y c #989898",
-".B c #999999",
-".D c #9e9e9e",
-".I c #a1a1a1",
-".n c #a6a6a6",
-".g c #a7a7a7",
-".6 c #a8a8a8",
-".O c #aaaaaa",
-".1 c #ababab",
-".R c #acacac",
-".T c #afafaf",
-".q c #b1b1b1",
-".V c #b3b3b3",
-".u c #b5b5b5",
-".A c #b6b6b6",
-".x c #bababa",
-".E c #bbbbbb",
-"#. c #bebebe",
-".J c #bfbfbf",
-".F c #c0c0c0",
-".P c #c1c1c1",
-".S c #c3c3c3",
-".U c #c5c5c5",
-".K c #c6c6c6",
-".G c #c8c8c8",
-".H c #c9c9c9",
-".L c #cacaca",
-".X c #cbcbcb",
-".C c #cccccc",
-".3 c #cdcdcd",
-".N c #cecece",
-".M c #cfcfcf",
-".5 c #d0d0d0",
-".Q c #d1d1d1",
-".y c #d2d2d2",
-".r c #d4d4d4",
-".h c #d5d5d5",
-".o c #d6d6d6",
-".v c #d7d7d7",
-".w c #d8d8d8",
-".s c #d9d9d9",
-".l c #dadada",
-".p c #dbdbdb",
-".9 c #dcdcdc",
-".W c #dedede",
-".m c #dfdfdf",
-".e c #e0e0e0",
-".# c #e1e1e1",
-".i c #e3e3e3",
-"Qt c #e4e4e4",
-".Z c #e6e6e6",
-"Qt.#.a.b.c.d",
-".e.f.g.h.iQt",
-".j.k.l.m.e.e",
-".b.n.o.l.p.p",
-".b.q.r.s.s.s",
-".t.u.r.v.w.w",
-".k.x.y.o.v.v",
-".z.A.y.r.v.o",
-".B.A.C.r.v.v",
-".D.E.F.G.H.H",
-".I.J.K.L.M.N",
-".O.P.C.y.Q.y",
-".R.S.N.o.v.o",
-".T.U.y.s.s.l",
-".V.H.r.p.W.W",
-".O.X.l.W.#.#",
-".Y.L.s.#.Z.Z",
-".0.K.m.Z.Z.Z",
-".1.2.e.Z.Z.Z",
-".3.Y.4.n.5.Z",
-".s.H.6.7.d.8",
-".9.l.r.L.S#."};
-
-static const char * const qt_mac_tab_press_mid[]={
-"7 22 19 1",
-"o c #555555",
-". c #6b6b6b",
-"p c #bbbbbb",
-"q c #bcbcbc",
-"g c #c8c8c8",
-"h c #cecece",
-"i c #d1d1d1",
-"f c #d6d6d6",
-"e c #d7d7d7",
-"d c #d8d8d8",
-"c c #d9d9d9",
-"j c #dadada",
-"b c #dbdbdb",
-"k c #dedede",
-"a c #e0e0e0",
-"l c #e1e1e1",
-"# c #e4e4e4",
-"m c #e5e5e5",
-"n c #e6e6e6",
-".......",
-"#######",
-"aaaaaaa",
-"bbbbbbb",
-"ccccccc",
-"ddddddd",
-"eeeeeee",
-"fffffff",
-"eeeeeee",
-"ggggggg",
-"hhhhhhh",
-"iiiiiii",
-"eeeeeee",
-"jjjjjjj",
-"kkkkkkk",
-"lllllll",
-"mmmmmmm",
-"nnnnnnn",
-"nnnnnnn",
-"nnnnnnn",
-"ooooooo",
-"ppppqqq"};
-
-static const char * const qt_mac_tab_press_right[]={
-"6 22 64 1",
-"5 c #5c5c5c",
-". c #6a6a6a",
-"# c #767676",
-"g c #7e7e7e",
-"v c #808080",
-"3 c #828282",
-"6 c #848484",
-"0 c #888888",
-"k c #8b8b8b",
-"Z c #8c8c8c",
-"z c #909090",
-"l c #919191",
-"a c #959595",
-"Y c #989898",
-"B c #999999",
-"G c #9e9e9e",
-"M c #a1a1a1",
-"o c #a6a6a6",
-"f c #a7a7a7",
-"7 c #a8a8a8",
-"P c #aaaaaa",
-"1 c #ababab",
-"R c #acacac",
-"T c #afafaf",
-"r c #b1b1b1",
-"V c #b3b3b3",
-"u c #b5b5b5",
-"y c #b6b6b6",
-"x c #bababa",
-"F c #bbbbbb",
-"8 c #bebebe",
-"L c #bfbfbf",
-"E c #c0c0c0",
-"O c #c1c1c1",
-"9 c #c2c2c2",
-"Q c #c3c3c3",
-"S c #c5c5c5",
-"K c #c6c6c6",
-"D c #c8c8c8",
-"C c #c9c9c9",
-"J c #cacaca",
-"W c #cbcbcb",
-"A c #cccccc",
-"4 c #cdcdcd",
-"H c #cecece",
-"I c #cfcfcf",
-"2 c #d0d0d0",
-"N c #d1d1d1",
-"w c #d2d2d2",
-"q c #d4d4d4",
-"e c #d5d5d5",
-"n c #d6d6d6",
-"t c #d7d7d7",
-"s c #d8d8d8",
-"p c #d9d9d9",
-"j c #dadada",
-"m c #dbdbdb",
-"U c #dedede",
-"i c #dfdfdf",
-"h c #e0e0e0",
-"b c #e1e1e1",
-"d c #e3e3e3",
-"c c #e4e4e4",
-"X c #e6e6e6",
-"..#abc",
-"cdefgb",
-"hhijkl",
-"mmjno#",
-"pppqr#",
-"sstquv",
-"ttnwxk",
-"ntqwyz",
-"ttqAyB",
-"CCDEFG",
-"HIJKLM",
-"wNwAOP",
-"ntnHQR",
-"jppwST",
-"UUmqCV",
-"bbUjWP",
-"XXbpJY",
-"XXXiKZ",
-"XXXh01",
-"X2o3Y4",
-"5.67Cj",
-"89Jqmm"};
-
static const char * const qt_mac_toolbar_ext[]={
"14 9 4 1",
"# c #858585",
diff --git a/src/gui/styles/qmotifstyle.cpp b/src/gui/styles/qmotifstyle.cpp
index 95f69b9..328b1c9 100644
--- a/src/gui/styles/qmotifstyle.cpp
+++ b/src/gui/styles/qmotifstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qmotifstyle.h b/src/gui/styles/qmotifstyle.h
index e244dba..e848eb4 100644
--- a/src/gui/styles/qmotifstyle.h
+++ b/src/gui/styles/qmotifstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qmotifstyle_p.h b/src/gui/styles/qmotifstyle_p.h
index b42e0d9..d65c592 100644
--- a/src/gui/styles/qmotifstyle_p.h
+++ b/src/gui/styles/qmotifstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 725e1d5..12aa679 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -2642,8 +2642,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// same rendering code for both orientations.
if (vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height
- QTransform m;
- m.translate(rect.height()-1, 0);
+ QTransform m = QTransform::fromTranslate(rect.height()-1, 0);
m.rotate(90.0);
painter->setTransform(m, true);
}
diff --git a/src/gui/styles/qplastiquestyle.h b/src/gui/styles/qplastiquestyle.h
index 7e236b8..ac3da41 100644
--- a/src/gui/styles/qplastiquestyle.h
+++ b/src/gui/styles/qplastiquestyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qproxystyle.cpp b/src/gui/styles/qproxystyle.cpp
index f36ad64..7177bed 100644
--- a/src/gui/styles/qproxystyle.cpp
+++ b/src/gui/styles/qproxystyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,27 +53,28 @@ QT_BEGIN_NAMESPACE
/*!
\class QProxyStyle
- \brief The QProxyStyle is a convenience class that simplifies
- the creation of proxy styles in Qt.
+ \brief The QProxyStyle class is a convenience class that simplifies
+ dynamically overriding QStyle elements.
\since 4.6
- A proxy style is a style that wraps a different,
- usually the default system style, to override the painting or
- behavior of only specific parts.
+ A QProxyStyle wraps a QStyle (usually the default system style) for the
+ purpose of dynamically overriding painting or other specific style behavior.
- Here's an example allowing you to override the shortcut underline
- behavior on all platforms:
+ The following example shows how to override the shortcut underline
+ behavior on any platform:
- \snippet doc/src/snippets/code/src_gui_proxystyle.cpp 0
+ \snippet doc/src/snippets/code/src_gui_qproxystyle.cpp 1
- Warning: Note that even though Qt's internal styles should respect this.
- hint, there is no guarantee that it will work for all styles.
- The example above would for instance not work on Mac since menus are
- handled by the operating system.
+ Warning: The \l {QCommonStyle} {common styles} provided by Qt will
+ respect this hint, because they call QStyle::proxy(), but there is
+ no guarantee that QStyle::proxy() will be called for user defined
+ or system controlled styles. It would not work on a Mac, for
+ example, where menus are handled by the operating system.
\sa QStyle
*/
+
void QProxyStylePrivate::ensureBaseStyle() const
{
Q_Q(const QProxyStyle);
@@ -92,7 +93,7 @@ void QProxyStylePrivate::ensureBaseStyle() const
baseStyle = 0;
}
}
- }
+ }
if (!baseStyle) // Use application desktop style
baseStyle = QStyleFactory::create(QApplicationPrivate::desktopStyleKey());
@@ -105,12 +106,12 @@ void QProxyStylePrivate::ensureBaseStyle() const
}
/*!
- Constructs a QProxyStyle object.
-
- If no base style is provided, the current application style
- will be used as the base style.
+ Constructs a QProxyStyle object for overriding behavior in \a style
+ or in the current application \l{QStyle}{style} if \a style is 0
+ (default). Normally \a style is 0, because you want to override
+ behavior in the system style.
- Ownership of \style is transferred to QProxyStyle.
+ Ownership of \a style is transferred to QProxyStyle.
*/
QProxyStyle::QProxyStyle(QStyle *style) :
QCommonStyle(*new QProxyStylePrivate())
@@ -147,7 +148,7 @@ QStyle *QProxyStyle::baseStyle() const
/*!
Sets the base style that should be proxied.
- Ownership of \style is transferred to QProxyStyle.
+ Ownership of \a style is transferred to QProxyStyle.
If style is zero, a desktop-dependant style will be
assigned automatically.
@@ -167,7 +168,8 @@ void QProxyStyle::setBaseStyle(QStyle *style)
}
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -175,7 +177,9 @@ void QProxyStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *op
d->baseStyle->drawPrimitive(element, option, painter, widget);
}
-/*! reimp */
+/*!
+ \reimp
+ */
void QProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -183,7 +187,8 @@ void QProxyStyle::drawControl(ControlElement element, const QStyleOption *option
d->baseStyle->drawControl(element, option, painter, widget);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -191,7 +196,8 @@ void QProxyStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
d->baseStyle->drawComplexControl(control, option, painter, widget);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled,
const QString &text, QPalette::ColorRole textRole) const
{
@@ -200,7 +206,8 @@ void QProxyStyle::drawItemText(QPainter *painter, const QRect &rect, int flags,
d->baseStyle->drawItemText(painter, rect, flags, pal, enabled, text, textRole);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const
{
Q_D (const QProxyStyle);
@@ -208,7 +215,8 @@ void QProxyStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int align
d->baseStyle->drawItemPixmap(painter, rect, alignment, pixmap);
}
-/*! reimp */
+/*! \reimp
+ */
QSize QProxyStyle::sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -216,7 +224,8 @@ QSize QProxyStyle::sizeFromContents(ContentsType type, const QStyleOption *optio
return d->baseStyle->sizeFromContents(type, option, size, widget);
}
-/*! reimp */
+/*! \reimp
+ */
QRect QProxyStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -224,7 +233,8 @@ QRect QProxyStyle::subElementRect(SubElement element, const QStyleOption *option
return d->baseStyle->subElementRect(element, option, widget);
}
-/*! reimp */
+/*! \reimp
+ */
QRect QProxyStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *option, SubControl sc, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -232,7 +242,8 @@ QRect QProxyStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *
return d->baseStyle->subControlRect(cc, option, sc, widget);
}
-/*! reimp */
+/*! \reimp
+ */
QRect QProxyStyle::itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const
{
Q_D (const QProxyStyle);
@@ -240,7 +251,8 @@ QRect QProxyStyle::itemTextRect(const QFontMetrics &fm, const QRect &r, int flag
return d->baseStyle->itemTextRect(fm, r, flags, enabled, text);
}
-/*! reimp */
+/*! \reimp
+ */
QRect QProxyStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const
{
Q_D (const QProxyStyle);
@@ -248,7 +260,8 @@ QRect QProxyStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap &pixm
return d->baseStyle->itemPixmapRect(r, flags, pixmap);
}
-/*! reimp */
+/*! \reimp
+ */
QStyle::SubControl QProxyStyle::hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -256,7 +269,8 @@ QStyle::SubControl QProxyStyle::hitTestComplexControl(ComplexControl control, co
return d->baseStyle->hitTestComplexControl(control, option, pos, widget);
}
-/*! reimp */
+/*! \reimp
+ */
int QProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
{
Q_D (const QProxyStyle);
@@ -264,7 +278,8 @@ int QProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWi
return d->baseStyle->styleHint(hint, option, widget, returnData);
}
-/*! reimp */
+/*! \reimp
+ */
int QProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -272,7 +287,8 @@ int QProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, con
return d->baseStyle->pixelMetric(metric, option, widget);
}
-/*! reimp */
+/*! \reimp
+ */
QPixmap QProxyStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const
{
Q_D (const QProxyStyle);
@@ -280,7 +296,8 @@ QPixmap QProxyStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleO
return d->baseStyle->standardPixmap(standardPixmap, opt, widget);
}
-/*! reimp */
+/*! \reimp
+ */
QPixmap QProxyStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
{
Q_D (const QProxyStyle);
@@ -288,7 +305,8 @@ QPixmap QProxyStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pi
return d->baseStyle->generatedIconPixmap(iconMode, pixmap, opt);
}
-/*! reimp */
+/*! \reimp
+ */
QPalette QProxyStyle::standardPalette() const
{
Q_D (const QProxyStyle);
@@ -296,7 +314,8 @@ QPalette QProxyStyle::standardPalette() const
return d->baseStyle->standardPalette();
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::polish(QWidget *widget)
{
Q_D (QProxyStyle);
@@ -304,7 +323,8 @@ void QProxyStyle::polish(QWidget *widget)
d->baseStyle->polish(widget);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::polish(QPalette &pal)
{
Q_D (QProxyStyle);
@@ -312,7 +332,8 @@ void QProxyStyle::polish(QPalette &pal)
d->baseStyle->polish(pal);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::polish(QApplication *app)
{
Q_D (QProxyStyle);
@@ -320,7 +341,8 @@ void QProxyStyle::polish(QApplication *app)
d->baseStyle->polish(app);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::unpolish(QWidget *widget)
{
Q_D (QProxyStyle);
@@ -328,7 +350,8 @@ void QProxyStyle::unpolish(QWidget *widget)
d->baseStyle->unpolish(widget);
}
-/*! reimp */
+/*! \reimp
+ */
void QProxyStyle::unpolish(QApplication *app)
{
Q_D (QProxyStyle);
@@ -336,7 +359,8 @@ void QProxyStyle::unpolish(QApplication *app)
d->baseStyle->unpolish(app);
}
-/*! reimp */
+/*! \reimp
+ */
bool QProxyStyle::event(QEvent *e)
{
Q_D (QProxyStyle);
@@ -344,17 +368,47 @@ bool QProxyStyle::event(QEvent *e)
return d->baseStyle->event(e);
}
-/*! reimp */
-QIcon QProxyStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
+/*!
+ Returns an icon for the given \a standardIcon.
+
+ Reimplement this slot to provide your own icons in a QStyle
+ subclass. The \a option argument can be used to pass extra
+ information required to find the appropriate icon. The \a widget
+ argument is optional and can also be used to help find the icon.
+
+ \note Because of binary compatibility constraints, standardIcon()
+ introduced in Qt 4.1 is not virtual. Therefore it must dynamically
+ detect and call \e this slot. This default implementation simply
+ calls standardIcon() with the given parameters.
+
+ \sa standardIcon()
+ */
+QIcon QProxyStyle::standardIconImplementation(StandardPixmap standardIcon,
+ const QStyleOption *option,
+ const QWidget *widget) const
{
Q_D (const QProxyStyle);
d->ensureBaseStyle();
return d->baseStyle->standardIcon(standardIcon, option, widget);
}
-/*! reimp */
-int QProxyStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,
- Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
+/*!
+ This slot is called by layoutSpacing() to determine the spacing that
+ should be used between \a control1 and \a control2 in a layout. \a
+ orientation specifies whether the controls are laid out side by side
+ or stacked vertically. The \a option parameter can be used to pass
+ extra information about the parent widget. The \a widget parameter
+ is optional and can also be used if \a option is 0.
+
+ The default implementation returns -1.
+
+ \sa layoutSpacing(), combinedLayoutSpacing()
+ */
+int QProxyStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1,
+ QSizePolicy::ControlType control2,
+ Qt::Orientation orientation,
+ const QStyleOption *option,
+ const QWidget *widget) const
{
Q_D (const QProxyStyle);
d->ensureBaseStyle();
diff --git a/src/gui/styles/qproxystyle.h b/src/gui/styles/qproxystyle.h
index 76b0768..c9edaff 100644
--- a/src/gui/styles/qproxystyle.h
+++ b/src/gui/styles/qproxystyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qproxystyle_p.h b/src/gui/styles/qproxystyle_p.h
index e7630d9..3d5f78d 100644
--- a/src/gui/styles/qproxystyle_p.h
+++ b/src/gui/styles/qproxystyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index c0fdc83..797886c 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -168,12 +168,21 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
\section1 Creating a Custom Style
- If you want to design a custom look and feel for your application,
- the first step is to pick one of the styles provided with Qt to
- build your custom style from. The choice will depend on which
- existing style resembles your style the most. The most general
- class that you can use as base is QCommonStyle (and not QStyle).
- This is because Qt requires its styles to be \l{QCommonStyle}s.
+ You can create a custom look and feel for your application by
+ creating a custom style. There are two approaches to creating a
+ custom style. In the static approach, you either choose an
+ existing QStyle class, subclass it, and reimplement virtual
+ functions to provide the custom behavior, or you create an entire
+ QStyle class from scratch. In the dynamic approach, you modify the
+ behavior of your system style at runtime. The static approach is
+ described below. The dynamic approach is described in QProxyStyle.
+
+ The first step in the static approach is to pick one of the styles
+ provided by Qt from which you will build your custom style. Your
+ choice of QStyle class will depend on which style resembles your
+ desired style the most. The most general class that you can use as
+ a base is QCommonStyle (not QStyle). This is because Qt requires
+ its styles to be \l{QCommonStyle}s.
Depending on which parts of the base style you want to change,
you must reimplement the functions that are used to draw those
@@ -222,7 +231,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
\section1 Using a Custom Style
There are several ways of using a custom style in a Qt
- application. The simplest way is call the
+ application. The simplest way is to pass the custom style to the
QApplication::setStyle() static function before creating the
QApplication object:
@@ -232,8 +241,8 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
it before the constructor, you ensure that the user's preference,
set using the \c -style command-line option, is respected.
- You may want to make your style available for use in other
- applications, some of which may not be yours and are not available for
+ You may want to make your custom style available for use in other
+ applications, which may not be yours and hence not available for
you to recompile. The Qt Plugin system makes it possible to create
styles as plugins. Styles created as plugins are loaded as shared
objects at runtime by Qt itself. Please refer to the \link
@@ -1182,6 +1191,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SC_All Special value that matches all sub-controls.
\omitvalue SC_Q3ListViewBranch
+ \omitvalue SC_CustomBase
\sa ComplexControl
*/
@@ -2450,14 +2460,12 @@ QDebug operator<<(QDebug debug, QStyle::State state)
/*!
\since 4.6
- \fn const QStyle * proxy() const
+ \fn const QStyle *QStyle::proxy() const
This function returns the current proxy for this style.
By default most styles will return themselves. However
when a proxy style is in use, it will allow the style to
call back into its proxy.
-
- \sa setProxyStyle
*/
const QStyle * QStyle::proxy() const
{
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index eec3326..d79c39c 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstyle_p.h b/src/gui/styles/qstyle_p.h
index 4cf20f0..854874f 100644
--- a/src/gui/styles/qstyle_p.h
+++ b/src/gui/styles/qstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylefactory.cpp b/src/gui/styles/qstylefactory.cpp
index 2e0448c..a1d585d 100644
--- a/src/gui/styles/qstylefactory.cpp
+++ b/src/gui/styles/qstylefactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylefactory.h b/src/gui/styles/qstylefactory.h
index c082cba..3b1f829 100644
--- a/src/gui/styles/qstylefactory.h
+++ b/src/gui/styles/qstylefactory.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index 20de892..f9010e8 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +48,12 @@
#include <private/qstyle_p.h>
#include <qmath.h>
+#if defined(Q_WS_WIN)
+#include "qt_windows.h"
+#elif defined(Q_WS_MAC)
+#include <private/qt_cocoa_helpers_mac_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
namespace QStyleHelper {
@@ -72,6 +78,26 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
return tmp;
}
+qreal dpiScaled(qreal value)
+{
+ static qreal scale = -1;
+ if (scale < 0) {
+ scale = 1.0;
+#if defined(Q_WS_WIN)
+ {
+ HDC hdcScreen = GetDC(0);
+ int dpi = GetDeviceCaps(hdcScreen, LOGPIXELSX);
+ ReleaseDC(0, hdcScreen);
+ scale = dpi/96.0;
+ }
+#elif defined(Q_WS_MAC)
+ scale = qt_mac_get_scalefactor();
+#endif
+ }
+ return value * scale;
+}
+
+
#ifndef QT_NO_DIAL
int calcBigLineSize(int radius)
@@ -178,7 +204,6 @@ QPolygonF calcLines(const QStyleOptionSlider *dial)
return poly;
}
-
// This will draw a nice and shiny QDial for us. We don't want
// all the shinyness in QWindowsStyle, hence we place it here
diff --git a/src/gui/styles/qstylehelper_p.h b/src/gui/styles/qstylehelper_p.h
index ef6e66c..cac88e2 100644
--- a/src/gui/styles/qstylehelper_p.h
+++ b/src/gui/styles/qstylehelper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -67,6 +67,7 @@ class QStyleOption;
namespace QStyleHelper
{
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size);
+ qreal dpiScaled(qreal value);
#ifndef QT_NO_DIAL
qreal angle(const QPointF &p1, const QPointF &p2);
QPolygonF calcLines(const QStyleOptionSlider *dial);
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index e441101..e174370 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -3542,7 +3542,8 @@ QStyleOptionQ3DockWindow::QStyleOptionQ3DockWindow(int version)
*/
QStyleOptionDockWidget::QStyleOptionDockWidget()
- : QStyleOption(Version, SO_DockWidget), movable(false)
+ : QStyleOption(Version, SO_DockWidget), closable(false),
+ movable(false), floatable(false)
{
}
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index eb05324..710c696 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstyleplugin.cpp b/src/gui/styles/qstyleplugin.cpp
index 19c08be..2f48015 100644
--- a/src/gui/styles/qstyleplugin.cpp
+++ b/src/gui/styles/qstyleplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstyleplugin.h b/src/gui/styles/qstyleplugin.h
index c7d9202..15e0f31 100644
--- a/src/gui/styles/qstyleplugin.h
+++ b/src/gui/styles/qstyleplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 1bbe70e..01d8aad 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylesheetstyle_default.cpp b/src/gui/styles/qstylesheetstyle_default.cpp
index 74e23b8..91464f7 100644
--- a/src/gui/styles/qstylesheetstyle_default.cpp
+++ b/src/gui/styles/qstylesheetstyle_default.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qstylesheetstyle_p.h b/src/gui/styles/qstylesheetstyle_p.h
index e057274..9b7b79d 100644
--- a/src/gui/styles/qstylesheetstyle_p.h
+++ b/src/gui/styles/qstylesheetstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowscestyle.cpp b/src/gui/styles/qwindowscestyle.cpp
index 5cb72f9..997fc72 100644
--- a/src/gui/styles/qwindowscestyle.cpp
+++ b/src/gui/styles/qwindowscestyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowscestyle.h b/src/gui/styles/qwindowscestyle.h
index fbb6d69..0422c79 100644
--- a/src/gui/styles/qwindowscestyle.h
+++ b/src/gui/styles/qwindowscestyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowscestyle_p.h b/src/gui/styles/qwindowscestyle_p.h
index 177d930..e9e02ef 100644
--- a/src/gui/styles/qwindowscestyle_p.h
+++ b/src/gui/styles/qwindowscestyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp
index f56d46c..c70b4c8 100644
--- a/src/gui/styles/qwindowsmobilestyle.cpp
+++ b/src/gui/styles/qwindowsmobilestyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsmobilestyle.h b/src/gui/styles/qwindowsmobilestyle.h
index f23ecc9..ab32e8e 100644
--- a/src/gui/styles/qwindowsmobilestyle.h
+++ b/src/gui/styles/qwindowsmobilestyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsmobilestyle_p.h b/src/gui/styles/qwindowsmobilestyle_p.h
index 83129cf..4f20bce3 100644
--- a/src/gui/styles/qwindowsmobilestyle_p.h
+++ b/src/gui/styles/qwindowsmobilestyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index c816907..997c2ce 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,6 +42,7 @@
#include "qwindowsstyle.h"
#include "qwindowsstyle_p.h"
#include <private/qpixmapdata_p.h>
+#include <private/qstylehelper_p.h>
#if !defined(QT_NO_STYLE_WINDOWS) || defined(QT_PLUGIN)
@@ -405,7 +406,7 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
#ifndef QT_NO_SLIDER
case PM_SliderLength:
- ret = 11;
+ ret = int(QStyleHelper::dpiScaled(11.));
break;
// Returns the number of pixels to use for the business part of the
@@ -453,11 +454,11 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
break;
case PM_SmallIconSize:
- ret = 16;
+ ret = int(QStyleHelper::dpiScaled(16.));
break;
case PM_LargeIconSize:
- ret = 32;
+ ret = int(QStyleHelper::dpiScaled(32.));
break;
case PM_IconViewIconSize:
@@ -465,13 +466,13 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
break;
case PM_ToolBarIconSize:
- ret = 24;
+ ret = int(QStyleHelper::dpiScaled(24.));
break;
case PM_DockWidgetTitleMargin:
- ret = 2;
+ ret = int(QStyleHelper::dpiScaled(2.));
break;
case PM_DockWidgetTitleBarButtonMargin:
- ret = 4;
+ ret = int(QStyleHelper::dpiScaled(4.));
break;
#if defined(Q_WS_WIN)
case PM_DockWidgetFrameWidth:
@@ -553,7 +554,7 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
ret = 0;
break;
case PM_ToolBarHandleExtent:
- ret = 10;
+ ret = int(QStyleHelper::dpiScaled(10.));
break;
default:
ret = QCommonStyle::pixelMetric(pm, opt, widget);
@@ -3200,11 +3201,14 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int defwidth = 0;
if (btn->features & QStyleOptionButton::AutoDefaultButton)
defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, btn, widget);
+ int minwidth = int(QStyleHelper::dpiScaled(75.));
+ int minheight = int(QStyleHelper::dpiScaled(23.));
+
#ifndef QT_QWS_SMALL_PUSHBUTTON
- if (w < 75 + defwidth && !btn->text.isEmpty())
- w = 75 + defwidth;
- if (h < 23 + defwidth)
- h = 23 + defwidth;
+ if (w < minwidth + defwidth && !btn->text.isEmpty())
+ w = minwidth + defwidth;
+ if (h < minheight + defwidth)
+ h = minheight + defwidth;
#endif
sz = QSize(w, h);
}
diff --git a/src/gui/styles/qwindowsstyle.h b/src/gui/styles/qwindowsstyle.h
index 7f45f20..c169a84 100644
--- a/src/gui/styles/qwindowsstyle.h
+++ b/src/gui/styles/qwindowsstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsstyle_p.h b/src/gui/styles/qwindowsstyle_p.h
index 1d1bdf5..2d03e0b 100644
--- a/src/gui/styles/qwindowsstyle_p.h
+++ b/src/gui/styles/qwindowsstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp
index be76b24..5f0f053 100644
--- a/src/gui/styles/qwindowsvistastyle.cpp
+++ b/src/gui/styles/qwindowsvistastyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,13 +34,14 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qwindowsvistastyle.h"
#include "qwindowsvistastyle_p.h"
+#include <private/qstylehelper_p.h>
#if !defined(QT_NO_STYLE_WINDOWSVISTA) || defined(QT_PLUGIN)
@@ -487,7 +488,12 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
case PE_IndicatorBranch:
{
XPThemeData theme(d->treeViewHelper(), painter, QLatin1String("TREEVIEW"));
- static const int decoration_size = 16;
+ static int decoration_size = 0;
+ if (theme.isValid() && !decoration_size) {
+ SIZE size;
+ pGetThemePartSize(theme.handle(), 0, TVP_HOTGLYPH, GLPS_OPENED, 0, TS_TRUE, &size);
+ decoration_size = qMax(size.cx, size.cy);
+ }
int mid_h = option->rect.x() + option->rect.width() / 2;
int mid_v = option->rect.y() + option->rect.height() / 2;
int bef_h = mid_h;
@@ -535,17 +541,6 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
}
break;
- case PE_IndicatorToolBarHandle:
- {
- XPThemeData theme;
- if (option->state & State_Horizontal)
- theme = XPThemeData(widget, painter, QLatin1String("REBAR"), RP_GRIPPER, ETS_NORMAL, option->rect.adjusted(0, 1, -2, -2));
- else
- theme = XPThemeData(widget, painter, QLatin1String("REBAR"), RP_GRIPPERVERT, ETS_NORMAL, option->rect.adjusted(0, 1, -2, -2));
- d->drawBackground(theme);
- }
- break;
-
case PE_FrameMenu:
{
int stateId = option->state & State_Active ? MB_ACTIVE : MB_INACTIVE;
@@ -694,6 +689,24 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
}
break;
+ case PE_IndicatorToolBarHandle:
+ {
+ XPThemeData theme;
+ QRect rect;
+ if (option->state & State_Horizontal) {
+ theme = XPThemeData(widget, painter, QLatin1String("REBAR"), RP_GRIPPER, ETS_NORMAL, option->rect.adjusted(0, 1, -2, -2));
+ rect = option->rect.adjusted(0, 1, 0, -2);
+ rect.setWidth(4);
+ } else {
+ theme = XPThemeData(widget, painter, QLatin1String("REBAR"), RP_GRIPPERVERT, ETS_NORMAL, option->rect.adjusted(0, 1, -2, -2));
+ rect = option->rect.adjusted(1, 0, -1, 0);
+ rect.setHeight(4);
+ }
+ theme.rect = rect;
+ d->drawBackground(theme);
+ }
+ break;
+
case PE_IndicatorToolBarSeparator:
{
QPen pen = painter->pen();
@@ -1047,7 +1060,8 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
QRect ir = subElementRect(SE_PushButtonContents, option, 0);
QStyleOptionButton newBtn = *btn;
newBtn.rect = QStyle::visualRect(option->direction, option->rect,
- QRect(ir.right() - mbiw - 2, (option->rect.height()/2) - (mbih/2),
+ QRect(ir.right() - mbiw - 2,
+ option->rect.top() + (option->rect.height()/2) - (mbih/2),
mbiw + 1, mbih + 1));
proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, painter, widget);
}
@@ -1229,7 +1243,15 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
case CE_MenuItem:
if (const QStyleOptionMenuItem *menuitem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
// windows always has a check column, regardless whether we have an icon or not
- int checkcol = qMax(menuitem->maxIconWidth, 28);
+ int checkcol = 28;
+ {
+ SIZE size;
+ MARGINS margins;
+ XPThemeData theme(widget, 0, QLatin1String("MENU"), MENU_POPUPCHECKBACKGROUND, MBI_HOT);
+ pGetThemePartSize(theme.handle(), NULL, MENU_POPUPCHECK, 0, NULL,TS_TRUE, &size);
+ pGetThemeMargins(theme.handle(), NULL, MENU_POPUPCHECK, 0, TMT_CONTENTMARGINS, NULL, &margins);
+ checkcol = qMax(menuitem->maxIconWidth, int(6 + size.cx + margins.cxLeftWidth + margins.cxRightWidth));
+ }
QColor darkLine = option->palette.background().color().darker(108);
QColor lightLine = option->palette.background().color().lighter(107);
QRect rect = option->rect;
@@ -1274,8 +1296,23 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
if (checked) {
XPThemeData theme(widget, painter, QLatin1String("MENU"), MENU_POPUPCHECKBACKGROUND,
menuitem->icon.isNull() ? MBI_HOT : MBI_PUSHED, vCheckRect);
+ SIZE size;
+ MARGINS margins;
+ pGetThemePartSize(theme.handle(), NULL, MENU_POPUPCHECK, 0, NULL,TS_TRUE, &size);
+ pGetThemeMargins(theme.handle(), NULL, MENU_POPUPCHECK, 0,
+ TMT_CONTENTMARGINS, NULL, &margins);
+ QRect checkRect(0, 0, size.cx + margins.cxLeftWidth + margins.cxRightWidth ,
+ size.cy + margins.cyBottomHeight + margins.cyTopHeight);
+ checkRect.moveCenter(vCheckRect.center());
+ theme.rect = checkRect;
+
d->drawBackground(theme);
+
if (menuitem->icon.isNull()) {
+ checkRect = QRect(0, 0, size.cx, size.cy);
+ checkRect.moveCenter(theme.rect.center());
+ theme.rect = checkRect;
+
theme.partId = MENU_POPUPCHECK;
bool bullet = menuitem->checkType & QStyleOptionMenuItem::Exclusive;
if (dis)
@@ -1655,7 +1692,7 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
if (sub & SC_ComboBoxArrow) {
QRect subRect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget);
XPThemeData theme(widget, painter, QLatin1String("COMBOBOX"));
- theme.rect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget);
+ theme.rect = subRect;
partId = option->direction == Qt::RightToLeft ? CP_DROPDOWNBUTTONLEFT : CP_DROPDOWNBUTTONRIGHT;
if (!(cmb->state & State_Enabled))
@@ -1925,9 +1962,18 @@ QSize QWindowsVistaStyle::sizeFromContents(ContentsType type, const QStyleOption
return sz;
case CT_MenuItem:
sz = QWindowsXPStyle::sizeFromContents(type, option, size, widget);
- sz.rwidth() += 28;
+ int minimumHeight;
+ {
+ SIZE size;
+ MARGINS margins;
+ XPThemeData theme(widget, 0, QLatin1String("MENU"), MENU_POPUPCHECKBACKGROUND, MBI_HOT);
+ pGetThemePartSize(theme.handle(), NULL, MENU_POPUPCHECK, 0, NULL,TS_TRUE, &size);
+ pGetThemeMargins(theme.handle(), NULL, MENU_POPUPCHECK, 0, TMT_CONTENTMARGINS, NULL, &margins);
+ minimumHeight = qMax<qint32>(size.cy + margins.cyBottomHeight+ margins.cyTopHeight, sz.height());
+ sz.rwidth() += size.cx + margins.cxLeftWidth + margins.cxRightWidth;
+ }
+
if (const QStyleOptionMenuItem *menuitem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
- int minimumHeight = qMax<qint32>(22, sz.height());
if (menuitem->menuItemType != QStyleOptionMenuItem::Separator)
sz.setHeight(minimumHeight);
}
@@ -2317,9 +2363,9 @@ int QWindowsVistaStyle::pixelMetric(PixelMetric metric, const QStyleOption *opti
switch (metric) {
case PM_DockWidgetTitleBarButtonMargin:
- return 5;
+ return int(QStyleHelper::dpiScaled(5.));
case PM_ScrollBarSliderMin:
- return 18;
+ return int(QStyleHelper::dpiScaled(18.));
case PM_MenuHMargin:
case PM_MenuVMargin:
return 0;
diff --git a/src/gui/styles/qwindowsvistastyle.h b/src/gui/styles/qwindowsvistastyle.h
index 0d1f202..97b1e74 100644
--- a/src/gui/styles/qwindowsvistastyle.h
+++ b/src/gui/styles/qwindowsvistastyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsvistastyle_p.h b/src/gui/styles/qwindowsvistastyle_p.h
index cef2b71..bae1aeb 100644
--- a/src/gui/styles/qwindowsvistastyle_p.h
+++ b/src/gui/styles/qwindowsvistastyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index c8a4441..322bfac 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -3235,7 +3235,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
break;
case PM_SplitterWidth:
- res = qMax(5, QApplication::globalStrut().width());
+ res = qMax(int(QStyleHelper::dpiScaled(5.)), QApplication::globalStrut().width());
break;
case PM_IndicatorWidth:
@@ -3245,7 +3245,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
if (theme.isValid()) {
SIZE size;
pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size);
- res = (pm == PM_IndicatorWidth ? size.cx+2 : res = size.cy+2);
+ res = (pm == PM_IndicatorWidth ? size.cx : res = size.cy);
}
}
break;
@@ -3257,7 +3257,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
if (theme.isValid()) {
SIZE size;
pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size);
- res = (pm == PM_ExclusiveIndicatorWidth ? size.cx+2 : res = size.cy+2);
+ res = (pm == PM_ExclusiveIndicatorWidth ? size.cx : res = size.cy);
}
}
break;
@@ -3329,7 +3329,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
#ifndef QT_NO_TOOLBAR
case PM_ToolBarHandleExtent:
- res = 8;
+ res = int(QStyleHelper::dpiScaled(8.));
break;
#endif // QT_NO_TOOLBAR
@@ -3344,10 +3344,10 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
}
break;
case PM_DockWidgetSeparatorExtent:
- res = 4;
+ res = int(QStyleHelper::dpiScaled(4.));
break;
case PM_DockWidgetTitleMargin:
- res = 4;
+ res = int(QStyleHelper::dpiScaled(4.));
break;
case PM_ButtonShiftHorizontal:
@@ -3358,6 +3358,10 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
res = 0;
break;
+ case PM_ButtonDefaultIndicator:
+ res = 0;
+ break;
+
default:
res = QWindowsStyle::pixelMetric(pm, option, widget);
}
diff --git a/src/gui/styles/qwindowsxpstyle.h b/src/gui/styles/qwindowsxpstyle.h
index 8faae82..ab26f56 100644
--- a/src/gui/styles/qwindowsxpstyle.h
+++ b/src/gui/styles/qwindowsxpstyle.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qwindowsxpstyle_p.h b/src/gui/styles/qwindowsxpstyle_p.h
index 7171629..1f9d2e1 100644
--- a/src/gui/styles/qwindowsxpstyle_p.h
+++ b/src/gui/styles/qwindowsxpstyle_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/