QCommonStyle: adjust painting CE_ComboBoxLabel text
Sync the rect used for painting a CE_ComboBoxLabel text with QLineEdit which is used for an editable QComboBox. Pick-to: 6.8 Task-number: QTBUG-130824 Change-Id: I9f3a31d68c6abed7e9cba4235847df3fa0d51ad1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
4c83657448
commit
dc1ae86bad
@ -2243,7 +2243,8 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
editRect.translate(cb->iconSize.width() + 4, 0);
|
||||
}
|
||||
if (!cb->currentText.isEmpty() && !cb->editable) {
|
||||
proxy()->drawItemText(p, editRect.adjusted(1, 0, -1, 0),
|
||||
// keep in sync with QLineEditPrivate::horizontalMargin = 2
|
||||
proxy()->drawItemText(p, editRect.adjusted(2, 0, -2, 0),
|
||||
visualAlignment(cb->direction, cb->textAlignment),
|
||||
cb->palette, cb->state & State_Enabled, cb->currentText);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user