]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Background color must be transparent in all qView(TreeView, ListView,...) objects
authornds <nds@opencascade.com>
Mon, 13 Aug 2007 07:03:58 +0000 (07:03 +0000)
committernds <nds@opencascade.com>
Mon, 13 Aug 2007 07:03:58 +0000 (07:03 +0000)
src/SUIT/SUIT_TreeModel.cxx

index 72e78e36a63714b1d16d316b8ca943aa36cccdcc..48f486896c0f87b0dbe6aa23b76c5793eb4c08cd 100755 (executable)
@@ -536,6 +536,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
       c = obj->color( SUIT_DataObject::Background, index.column() );
       if ( !c.isValid() ) // default value
        c = QApplication::palette().color( QPalette::Base );
+      c.setAlpha( 0 );
       val = c; 
       break;
     case ForegroundRole:
@@ -1367,8 +1368,11 @@ void SUIT_ItemDelegate::paint( QPainter* painter,
     // Note: we check into account only custom roles; other roles are process
     //       correctly by the QItemDelegate class
     QVariant val = index.data( SUIT_TreeModel::BaseColorRole );
-    if ( val.isValid() && val.value<QColor>().isValid() )
+    if ( val.isValid() && val.value<QColor>().isValid() ) {
+      QColor aBase = val.value<QColor>();
+      aBase.setAlpha( 0 );
       opt.palette.setBrush( QPalette::Base, val.value<QColor>() );
+    }
     val = index.data( SUIT_TreeModel::TextColorRole );
     if ( val.isValid() && val.value<QColor>().isValid() )
       opt.palette.setBrush( QPalette::Text, val.value<QColor>() );