From: nds Date: Thu, 24 Apr 2008 15:45:26 +0000 (+0000) Subject: Gets modification from BR_QT4_Dev.(Find dialog has red color if condition isn't done) X-Git-Tag: TG_ACHERON_V9_0_6~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8beafd800664bbb721c10bf77fcaae18971ad044;p=modules%2Fgui.git Gets modification from BR_QT4_Dev.(Find dialog has red color if condition isn't done) --- 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; }