summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-08-27 22:51:09 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-08-27 22:51:09 +0200
commit190fa97c83472863fd886e86f626ab8196ed51b3 (patch)
tree49edb9f6a41d6c999c9bb43ae28911a8e7212757 /src/widgets
parent3aa163491c9c8f28c88ac87cafc6418f2c0e46c5 (diff)
parent5971e0918757737425151c39a5f81a238663a17a (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp1
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp46
3 files changed, 26 insertions, 23 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index f0846bea6b..665aa4b17a 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -900,6 +900,8 @@ void QWidgetPrivate::createTLSysExtra()
extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh));
if (extra->maxw != QWIDGETSIZE_MAX || extra->maxh != QWIDGETSIZE_MAX)
extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh));
+ if (extra->topextra->opacity != 255 && q->isWindow())
+ extra->topextra->window->setOpacity(qreal(extra->topextra->opacity) / qreal(255));
#ifdef Q_OS_WIN
// Pass on native parent handle for Widget embedded into Active X.
const QVariant activeXNativeParentHandle = q->property(activeXNativeParentHandleProperty);
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 0c1ae56349..539cc70eb7 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1330,7 +1330,6 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
break;
#ifndef QT_NO_MENU
case CE_MenuScroller: {
- p->fillRect(opt->rect, opt->palette.background());
QStyleOption arrowOpt = *opt;
arrowOpt.state |= State_Enabled;
proxy()->drawPrimitive(((opt->state & State_DownArrow) ? PE_IndicatorArrowDown : PE_IndicatorArrowUp),
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index e442e53bde..22458eb96f 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1830,29 +1830,31 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
int gw = size.cx, gh = size.cy;
- QRect gripperBounds;
- if (flags & State_Horizontal && ((swidth - contentsMargin.cxLeftWidth - contentsMargin.cxRightWidth) > gw)) {
- gripperBounds.setLeft(theme.rect.left() + swidth/2 - gw/2);
- gripperBounds.setTop(theme.rect.top() + sheight/2 - gh/2);
- gripperBounds.setWidth(gw);
- gripperBounds.setHeight(gh);
- } else if ((sheight - contentsMargin.cyTopHeight - contentsMargin.cyBottomHeight) > gh) {
- gripperBounds.setLeft(theme.rect.left() + swidth/2 - gw/2);
- gripperBounds.setTop(theme.rect.top() + sheight/2 - gh/2);
- gripperBounds.setWidth(gw);
- gripperBounds.setHeight(gh);
- }
+ if (QSysInfo::WindowsVersion < QSysInfo::WV_WINDOWS8) {
+ QRect gripperBounds;
+ if (flags & State_Horizontal && ((swidth - contentsMargin.cxLeftWidth - contentsMargin.cxRightWidth) > gw)) {
+ gripperBounds.setLeft(theme.rect.left() + swidth/2 - gw/2);
+ gripperBounds.setTop(theme.rect.top() + sheight/2 - gh/2);
+ gripperBounds.setWidth(gw);
+ gripperBounds.setHeight(gh);
+ } else if ((sheight - contentsMargin.cyTopHeight - contentsMargin.cyBottomHeight) > gh) {
+ gripperBounds.setLeft(theme.rect.left() + swidth/2 - gw/2);
+ gripperBounds.setTop(theme.rect.top() + sheight/2 - gh/2);
+ gripperBounds.setWidth(gw);
+ gripperBounds.setHeight(gh);
+ }
- // Draw gripper if there is enough space
- if (!gripperBounds.isEmpty() && flags & State_Enabled) {
- painter->save();
- XPThemeData grippBackground = theme;
- grippBackground.partId = flags & State_Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT;
- theme.rect = gripperBounds;
- painter->setClipRegion(d->region(theme));// Only change inside the region of the gripper
- d->drawBackground(grippBackground);// The gutter is the grippers background
- d->drawBackground(theme); // Transparent gripper ontop of background
- painter->restore();
+ // Draw gripper if there is enough space
+ if (!gripperBounds.isEmpty() && flags & State_Enabled) {
+ painter->save();
+ XPThemeData grippBackground = theme;
+ grippBackground.partId = flags & State_Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT;
+ theme.rect = gripperBounds;
+ painter->setClipRegion(d->region(theme));// Only change inside the region of the gripper
+ d->drawBackground(grippBackground);// The gutter is the grippers background
+ d->drawBackground(theme); // Transparent gripper ontop of background
+ painter->restore();
+ }
}
}
}