Mac style: Fix one-pixel offset for combo boxes in small size

Change-Id: I744c102bd086742b1052ed547e50037dddff4654
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2014-04-03 17:48:17 +02:00 committed by The Qt Project
parent d2f5fdb20d
commit 30e6d442ff

View File

@ -3721,7 +3721,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
QStyleOptionComboBox comboCopy = *cb;
comboCopy.direction = Qt::LeftToRight;
if ((opt->state & QStyle::State_Small) && QSysInfo::macVersion() > QSysInfo::MV_10_6)
comboCopy.rect.translate(0, w ? -1 : -2); // Supports Qt Quick Controls
comboCopy.rect.translate(0, w ? (QSysInfo::macVersion() > QSysInfo::MV_10_8 ? 0 : -1) : -2); // Supports Qt Quick Controls
else if (QSysInfo::macVersion() > QSysInfo::MV_10_8)
comboCopy.rect.translate(0, 1);
QCommonStyle::drawControl(CE_ComboBoxLabel, &comboCopy, p, w);