From 17722a6c796319dc1cf9b757792aad55a39f4738 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 5 Jan 2009 10:42:42 +0100 Subject: [PATCH] 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. --- src/plugins/coreplugin/manhattanstyle.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index ecc0683d283..5b72c891cd6 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -822,10 +822,12 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti } State mflags = bflags; - if (toolbutton->activeSubControls & SC_ToolButton) - bflags |= State_Sunken; - if (toolbutton->activeSubControls & SC_ToolButtonMenu) - mflags |= State_Sunken; + if (toolbutton->state & State_Sunken) { + if (toolbutton->activeSubControls & SC_ToolButton) + bflags |= State_Sunken; + if (toolbutton->activeSubControls & SC_ToolButtonMenu) + mflags |= State_Sunken; + } QStyleOption tool(0); tool.palette = toolbutton->palette;