summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-05-08 01:31:20 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-17 02:07:36 +0200
commit518d874bc8cd43a6e87700be00c6f5132288bd35 (patch)
tree75853c1b96d5caadf3fc8c7caed000a29a1421f3 /src
parentcfcbb957c7ee85decee3379d8876a7b4094ae501 (diff)
QMacStyle: Always draw status bar in active state if the window is main.
On OS X, most controls are drawn active or inactive based on their window's main state, NOT its key ("active" in Qt) state. Change-Id: If447d0a537bc594978f7202e7888ceacb54ec8fa Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index e165b8aa68..8bc454a795 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -3265,7 +3265,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
case PE_PanelStatusBar: {
// Fill the status bar with the titlebar gradient.
QLinearGradient linearGrad(0, opt->rect.top(), 0, opt->rect.bottom());
- if (opt->state & QStyle::State_Active) {
+ if (w ? qt_macWindowMainWindow(w->window()) : (opt->state & QStyle::State_Active)) {
linearGrad.setColorAt(0, titlebarGradientActiveBegin);
linearGrad.setColorAt(1, titlebarGradientActiveEnd);
} else {
@@ -3275,7 +3275,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
p->fillRect(opt->rect, linearGrad);
// Draw the black separator line at the top of the status bar.
- if (opt->state & QStyle::State_Active)
+ if (w ? qt_macWindowMainWindow(w->window()) : (opt->state & QStyle::State_Active))
p->setPen(titlebarSeparatorLineActive);
else
p->setPen(titlebarSeparatorLineInactive);