Changeset 1903:d186587ac38e in orange-bioinformatics


Ignore:
Timestamp:
11/11/13 16:20:15 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Chaged the selected item's brush pattern.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWVennDiagram.py

    r1902 r1903  
    567567        painter.save() 
    568568        path = self.path() 
    569         brush = self.brush() 
     569        brush = QBrush(self.brush()) 
    570570        pen = QPen(self.pen()) 
     571 
    571572        if option.state & QStyle.State_Selected: 
    572573            pen.setColor(Qt.red) 
     574            brush.setStyle(Qt.DiagCrossPattern) 
     575            brush.setColor(QColor(40, 40, 40, 100)) 
     576 
    573577        elif option.state & QStyle.State_MouseOver: 
    574578            pen.setColor(Qt.blue) 
    575579 
    576580        if option.state & QStyle.State_MouseOver: 
    577             brush = QBrush(QColor(100, 100, 100, 100)) 
     581            brush.setColor(QColor(100, 100, 100, 100)) 
     582            if brush.style() == Qt.NoBrush: 
     583                # Make sure the highlight is actually visible. 
     584                brush.setStyle(Qt.SolidPattern) 
    578585 
    579586        painter.setPen(pen) 
Note: See TracChangeset for help on using the changeset viewer.