Changeset 11393:6dd5b2647d2d in orange


Ignore:
Timestamp:
03/11/13 17:21:59 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed named color mappings for Qt widget item model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/registry/qt.py

    r11341 r11393  
    249249 
    250250        # This should be inherited from the category. 
     251        background = None 
    251252        if desc.background: 
    252             brush = QBrush(QColor(desc.background)) 
     253            background = desc.background 
    253254        elif category.background: 
    254             brush = QBrush(QColor(category.background)) 
    255         else: 
    256             brush = None 
    257  
    258         if brush is not None: 
     255            background = category.background 
     256 
     257        if background is not None: 
     258            background = NAMED_COLORS.get(background, background) 
     259            brush = QBrush(QColor(background)) 
    259260            item.setData(brush, self.BACKGROUND_ROLE) 
    260261 
Note: See TracChangeset for help on using the changeset viewer.