From f85c56dab364acda84f0565a2baadc7efd1512fd Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 30 Oct 2007 12:18:51 +0000 Subject: [PATCH] Small correction for QListWidget object. 1. Create QListWidgetItem, 2. item->edit(). 3. Error: last item text existing in viewer then user input new text. --- src/Style/Style_Salome.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Style/Style_Salome.cxx b/src/Style/Style_Salome.cxx index 1a57b086a..85c6e1875 100644 --- a/src/Style/Style_Salome.cxx +++ b/src/Style/Style_Salome.cxx @@ -1566,6 +1566,10 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, } } else { + 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)) { QRect rect = panel->rect.adjusted( panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth); @@ -1574,6 +1578,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, else // not QLineEdit p->fillRect(rect, panel->palette.brush(QPalette::Base)); } + */ } break; } @@ -1719,7 +1724,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, QPalette aPal = aWdg->palette(); double aMarg = LINE_GR_MARGIN; QColor base = getColor( Style_Model::pal_base_clr ), - light = base, + light = base, light_alt = base.dark(110),//AlternateBase color dark = getColor( Style_Model::fld_dark_clr ); light.setAlpha( 0 ); -- 2.39.2