Mac Style: Fix 1-pixel text offset in combo box

Change-Id: Ie1bb2b300d6897659f4652c22884f1bd611cd3c4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-08-05 14:38:36 +02:00 committed by The Qt Project
parent 488f7a31ff
commit 4881f9db7c

View File

@ -3741,6 +3741,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
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
else if (QSysInfo::macVersion() > QSysInfo::MV_10_8)
comboCopy.rect.translate(0, 1);
QCommonStyle::drawControl(CE_ComboBoxLabel, &comboCopy, p, w);
}
break;