Fixes: Fix hover on toolbuttons

RevBy:    trust me
Details:
Now that hover is correctly implemented for
toolbuttons, we actually have to check the sunken
state.
This commit is contained in:
Jens Bache-Wiig
2009-01-05 10:42:42 +01:00
parent 2ec448d1d7
commit 17722a6c79

View File

@@ -822,10 +822,12 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
} }
State mflags = bflags; State mflags = bflags;
if (toolbutton->state & State_Sunken) {
if (toolbutton->activeSubControls & SC_ToolButton) if (toolbutton->activeSubControls & SC_ToolButton)
bflags |= State_Sunken; bflags |= State_Sunken;
if (toolbutton->activeSubControls & SC_ToolButtonMenu) if (toolbutton->activeSubControls & SC_ToolButtonMenu)
mflags |= State_Sunken; mflags |= State_Sunken;
}
QStyleOption tool(0); QStyleOption tool(0);
tool.palette = toolbutton->palette; tool.palette = toolbutton->palette;