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>
This commit is contained in:
parent
86b000ea1b
commit
e558e71791
@ -1970,6 +1970,7 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
|
|||||||
|| bdi->kind == kThemeComboBoxSmall
|
|| bdi->kind == kThemeComboBoxSmall
|
||||||
|| bdi->kind == kThemeComboBoxMini;
|
|| bdi->kind == kThemeComboBoxMini;
|
||||||
const bool button = opt->type == QStyleOption::SO_Button;
|
const bool button = opt->type == QStyleOption::SO_Button;
|
||||||
|
const bool viewItem = opt->type == QStyleOption::SO_ViewItem;
|
||||||
const bool pressed = bdi->state == kThemeStatePressed;
|
const bool pressed = bdi->state == kThemeStatePressed;
|
||||||
const bool usingYosemiteOrLater = QSysInfo::MacintoshVersion > QSysInfo::MV_10_9;
|
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);
|
HIRect newRect = CGRectMake(xoff, yoff, macRect.size.width, macRect.size.height);
|
||||||
if (button && pressed)
|
if (button && pressed)
|
||||||
bdi->state = kThemeStateActive;
|
bdi->state = kThemeStateActive;
|
||||||
|
else if (usingYosemiteOrLater && viewItem)
|
||||||
|
bdi->state = kThemeStateInactive;
|
||||||
HIThemeDrawButton(&newRect, bdi, cg, kHIThemeOrientationNormal, 0);
|
HIThemeDrawButton(&newRect, bdi, cg, kHIThemeOrientationNormal, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2057,7 +2060,7 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
|
|||||||
rect.adjust(0, 0, -5, 0);
|
rect.adjust(0, 0, -5, 0);
|
||||||
drawNSViewInRect(cw, bc, rect, p);
|
drawNSViewInRect(cw, bc, rect, p);
|
||||||
return;
|
return;
|
||||||
} else if (usingYosemiteOrLater && editableCombo) {
|
} else if (usingYosemiteOrLater && (editableCombo || viewItem)) {
|
||||||
QImage image = activePixmap.toImage();
|
QImage image = activePixmap.toImage();
|
||||||
|
|
||||||
for (int y = 0; y < height; ++y) {
|
for (int y = 0; y < height; ++y) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user