Vista Style: More menu item pixel fixes for QtQuick Controls
Includes a one-pixel fix for widgets, where the menu item text would be one pixel too far away from the vertical gutter. Task-number: QTBUG-37451 Change-Id: I2539233814a427c5bed66a5c07584717eb3df418 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
This commit is contained in:
parent
ff7f3aba39
commit
9cd2dac348
@ -1273,7 +1273,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
||||
QPoint p1 = QPoint(x + checkcol, yoff);
|
||||
QPoint p2 = QPoint(x + w + 6 , yoff);
|
||||
stateId = MBI_HOT;
|
||||
QRect subRect(p1.x(), p1.y(), p2.x() - p1.x(), 6);
|
||||
QRect subRect(p1.x() + (3 - menuitem->rect.x()), p1.y(), p2.x() - p1.x(), 6);
|
||||
subRect = QStyle::visualRect(option->direction, option->rect, subRect );
|
||||
XPThemeData theme2(widget, painter,
|
||||
QWindowsXPStylePrivate::MenuTheme,
|
||||
@ -1348,7 +1348,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
||||
if (dis)
|
||||
painter->setPen(textColor);
|
||||
|
||||
int xm = windowsItemFrame + checkcol + windowsItemHMargin;
|
||||
int xm = windowsItemFrame + checkcol + windowsItemHMargin + (3 - menuitem->rect.x()) - 1;
|
||||
int xpos = menuitem->rect.x() + xm;
|
||||
QRect textRect(xpos, y + windowsItemVMargin, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin);
|
||||
QRect vTextRect = visualRect(option->direction, menuitem->rect, textRect);
|
||||
|
Loading…
Reference in New Issue
Block a user