From 8beafd800664bbb721c10bf77fcaae18971ad044 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 24 Apr 2008 15:45:26 +0000 Subject: [PATCH] Gets modification from BR_QT4_Dev.(Find dialog has red color if condition isn't done) --- src/Style/Style_Salome.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Style/Style_Salome.cxx b/src/Style/Style_Salome.cxx index fe568a7e7..e1ffb6b6b 100644 --- a/src/Style/Style_Salome.cxx +++ b/src/Style/Style_Salome.cxx @@ -443,7 +443,9 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp button = subControlRect(cc, toolbutton, SC_ToolButton, w); menuArea = subControlRect(cc, toolbutton, SC_ToolButtonMenu, w); - if (w && qobject_cast(w->parentWidget())) { + if (w && ( qobject_cast(w->parentWidget() ) || + toolbutton->state & State_AutoRaise && !( toolbutton->state & State_MouseOver ) ) + ) { QWindowsStyle::drawComplexControl( cc, opt, p, w ); return; } @@ -1562,14 +1564,13 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, drawHoverRect(p, opt->rect, opt->palette.color( QPalette::Window ), aRad, Style_Tools::All, true); else { Style_Tools::shadowRect( p, opt->rect, aRad, LINE_GR_MARGIN, SHADOW, - Style_Tools::All, getColor( Style_Model::fld_light_clr ), + Style_Tools::All, opt->palette.color( QPalette::Base ), //, getColor( Style_Model::fld_light_clr ), getColor( Style_Model::fld_dark_clr ), aBrdTopCol, aBrdBotCol, getBoolValue( Style_Model::all_antialized ), false ); } } else { - drawPrimitive( PE_FrameLineEdit, opt, p, w ); - /* + //drawPrimitive( PE_FrameLineEdit, opt, p, w ); // fillRect()'s not correct working with basic color // for ListWidget in edit QListWidgetItem mode if (const QStyleOptionFrame *panel = qstyleoption_cast(opt)) { @@ -1580,7 +1581,6 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, else // not QLineEdit p->fillRect(rect, panel->palette.brush(QPalette::Base)); } - */ } break; } -- 2.39.2