summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2015-01-29 15:25:53 +0100
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-02-09 13:36:04 +0000
commite558e71791bb0cdcf77f81fe904c61597c01ae1e (patch)
tree78746050453dca337ea5dcb41d9da36fe6044262 /src
parent86b000ea1b91e4addce61a1c50db0d6c0eda06ac (diff)
Fix the look of inactive checkboxes in itemviews on OS X 10.10
Task-number: QTBUG-43875 Change-Id: I4734647e2f3f9e3f68a3ae77fb5c825c7d99f8b4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 38c082baf5..0a9fb19fa4 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -1970,6 +1970,7 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
|| bdi->kind == kThemeComboBoxSmall
|| bdi->kind == kThemeComboBoxMini;
const bool button = opt->type == QStyleOption::SO_Button;
+ const bool viewItem = opt->type == QStyleOption::SO_ViewItem;
const bool pressed = bdi->state == kThemeStatePressed;
const bool usingYosemiteOrLater = QSysInfo::MacintoshVersion > QSysInfo::MV_10_9;
@@ -2010,6 +2011,8 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
HIRect newRect = CGRectMake(xoff, yoff, macRect.size.width, macRect.size.height);
if (button && pressed)
bdi->state = kThemeStateActive;
+ else if (usingYosemiteOrLater && viewItem)
+ bdi->state = kThemeStateInactive;
HIThemeDrawButton(&newRect, bdi, cg, kHIThemeOrientationNormal, 0);
}
}
@@ -2057,7 +2060,7 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
rect.adjust(0, 0, -5, 0);
drawNSViewInRect(cw, bc, rect, p);
return;
- } else if (usingYosemiteOrLater && editableCombo) {
+ } else if (usingYosemiteOrLater && (editableCombo || viewItem)) {
QImage image = activePixmap.toImage();
for (int y = 0; y < height; ++y) {