diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-11-04 15:09:27 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-11-04 15:54:31 (GMT) |
commit | 5f9187991c25c3bbe812b788251678f0ab1116a3 (patch) | |
tree | 85d552449ea82b7d2c18528400579d3507af4385 /src/gui/styles/qwindowsstyle_p.h | |
parent | 3ac785411d860e48e14f6b2542b666a6d508cff1 (diff) | |
download | Qt-5f9187991c25c3bbe812b788251678f0ab1116a3.zip Qt-5f9187991c25c3bbe812b788251678f0ab1116a3.tar.gz Qt-5f9187991c25c3bbe812b788251678f0ab1116a3.tar.bz2 |
Wrong styling of checkable menu items.
When using style sheets, the fallback for the menu item is
QWindowsStyle. However, QWindowsStyle doesn't draw anything when the item is
not checked.
We now mimick what QWindowsStyle would draw in
QStyleSheetStyle::drawControl().
The "static const int windows*" variables in qwindowsstyle.cpp
have been moved into QWindowsStylePrivate to make them accessible to
QStyleSheetStyle.
Reviewed-by: Olivier
Task-number: QTBUG-2218
Task-number: QTBUG-2217
Task-number: QTBUG-3479
Diffstat (limited to 'src/gui/styles/qwindowsstyle_p.h')
-rw-r--r-- | src/gui/styles/qwindowsstyle_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/styles/qwindowsstyle_p.h b/src/gui/styles/qwindowsstyle_p.h index fb84dce..d81c82b 100644 --- a/src/gui/styles/qwindowsstyle_p.h +++ b/src/gui/styles/qwindowsstyle_p.h @@ -87,7 +87,17 @@ public: QColor activeGradientCaptionColor; QColor inactiveCaptionColor; QColor inactiveGradientCaptionColor; + + enum { + windowsItemFrame = 2, // menu item frame width + windowsSepHeight = 9, // separator item height + windowsItemHMargin = 3, // menu item hor text margin + windowsItemVMargin = 2, // menu item ver text margin + windowsArrowHMargin = 6, // arrow horizontal margin + windowsRightBorder = 15, // right border on windows + windowsCheckMarkWidth = 12 // checkmarks width on windows }; +}; QT_END_NAMESPACE |