summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-10-28 09:03:25 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-10-28 09:03:25 (GMT)
commit2ecf21f48b9d328b4d732848d1d20115d1891c42 (patch)
tree1fe81d9a4fc5640dca29ebf5ca2e048d805dda15 /src/gui/styles
parent1ec19ed5a69b8b0e11c81037c270072736f48e40 (diff)
parent0313ccbfaff690c5a8fc18a3a2c7d976a4a55aaf (diff)
downloadQt-2ecf21f48b9d328b4d732848d1d20115d1891c42.zip
Qt-2ecf21f48b9d328b4d732848d1d20115d1891c42.tar.gz
Qt-2ecf21f48b9d328b4d732848d1d20115d1891c42.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into 4.6-WM_NULL-driven
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm9
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 63ba641..4dcb469 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -3637,17 +3637,19 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
break;
}
}
+ bool stretchTabs = (!verticalTabs && tabRect.height() > 22 || verticalTabs && tabRect.width() > 22);
+
switch (tp) {
case QStyleOptionTab::Beginning:
tdi.position = kHIThemeTabPositionFirst;
- if (sp != QStyleOptionTab::NextIsSelected)
+ if (sp != QStyleOptionTab::NextIsSelected || stretchTabs)
tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
break;
case QStyleOptionTab::Middle:
tdi.position = kHIThemeTabPositionMiddle;
if (selected)
tdi.adornment |= kHIThemeTabAdornmentLeadingSeparator;
- if (sp != QStyleOptionTab::NextIsSelected) // Also when we're selected.
+ if (sp != QStyleOptionTab::NextIsSelected || stretchTabs) // Also when we're selected.
tdi.adornment |= kHIThemeTabAdornmentTrailingSeparator;
break;
case QStyleOptionTab::End:
@@ -3659,9 +3661,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
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)) {
+ if (stretchTabs) {
HIRect hirect = CGRectMake(0, 0, 23, 23);
QPixmap pm(23, 23);
pm.fill(Qt::transparent);
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 9ef30e5..2f00f07 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -47,6 +47,7 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qapplication_p.h>
#include <private/qstylehelper_p.h>
+#include <private/qwidget_p.h>
#include <qlibrary.h>
#include <qpainter.h>
#include <qpaintengine.h>
@@ -299,7 +300,11 @@ HWND QWindowsXPStylePrivate::winId(const QWidget *widget)
if (!limboWidget) {
limboWidget = new QWidget(0);
+ limboWidget->createWinId();
limboWidget->setObjectName(QLatin1String("xp_limbo_widget"));
+ // We dont need this internal widget to appear in QApplication::topLevelWidgets()
+ if (QWidgetPrivate::allWidgets)
+ QWidgetPrivate::allWidgets->remove(limboWidget);
}
return limboWidget->winId();