diff options
Diffstat (limited to 'src/gui/styles/qwindowsxpstyle.cpp')
-rw-r--r-- | src/gui/styles/qwindowsxpstyle.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 9c4afee..4d1fb7a 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -1918,8 +1918,8 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op { name = QLatin1String("BUTTON"); partId = BP_PUSHBUTTON; - bool justFlat = (btn->features & QStyleOptionButton::Flat) && !(flags & (State_On|State_Sunken)) - || (btn->features & QStyleOptionButton::CommandLinkButton + bool justFlat = ((btn->features & QStyleOptionButton::Flat) && !(flags & (State_On|State_Sunken))) + || ((btn->features & QStyleOptionButton::CommandLinkButton) && !(flags & State_MouseOver) && !(btn->features & QStyleOptionButton::DefaultButton)); if (!(flags & State_Enabled) && !(btn->features & QStyleOptionButton::Flat)) @@ -3244,7 +3244,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con if (theme.isValid()) { SIZE size; pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size); - res = (pm == PM_IndicatorWidth ? size.cx : res = size.cy); + res = (pm == PM_IndicatorWidth) ? size.cx : size.cy; } } break; @@ -3256,7 +3256,7 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con if (theme.isValid()) { SIZE size; pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size); - res = (pm == PM_ExclusiveIndicatorWidth ? size.cx : res = size.cy); + res = (pm == PM_ExclusiveIndicatorWidth) ? size.cx : size.cy; } } break; @@ -3536,6 +3536,8 @@ QRect QWindowsXPStyle::subControlRect(ComplexControl cc, const QStyleOptionCompl rect = QRect(frameWidth + hPad, controlTop + vPad, iconSize.width(), iconSize.height()); } break; + default: + break; } } break; @@ -3562,6 +3564,9 @@ QRect QWindowsXPStyle::subControlRect(ComplexControl cc, const QStyleOptionCompl case SC_ComboBoxListBoxPopup: rect = cmb->rect; break; + + default: + break; } } break; @@ -3802,6 +3807,8 @@ QPixmap QWindowsXPStyle::standardPixmap(StandardPixmap standardPixmap, const QSt } } break; + default: + break; } return QWindowsStyle::standardPixmap(standardPixmap, option, widget); } @@ -3923,6 +3930,8 @@ QIcon QWindowsXPStyle::standardIconImplementation(StandardPixmap standardIcon, } break; + default: + break; } return QWindowsStyle::standardIconImplementation(standardIcon, option, widget); |