Changeset 10608:8eb49e810732 in orange


Ignore:
Timestamp:
03/21/12 17:10:43 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Children:
10609:4fe22b62beac, 10617:6371404841d6
rebase_source:
97f0b320ba71f94281c7f4ff546cc8808bcc5113
Message:

Move the text slightly up when drawing a distribution bar (fixes #989).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/OWGUI.py

    r10580 r10608  
    18131813            painter.drawLine(x, y, x + rect.width() * ratio, y) 
    18141814            painter.restore() 
     1815            # raise the lower edge 3 pixels up 
     1816            text_rect = option.rect.adjusted(0, 0, 0, -3) 
     1817        else: 
     1818            text_rect = option.rect 
    18151819        text = index.data(Qt.DisplayRole).toString() 
    18161820 
    1817         self.drawDisplay(painter, option, option.rect, text) 
     1821        self.drawDisplay(painter, option, text_rect, text) 
    18181822        painter.restore() 
    18191823         
     
    19601964 
    19611965class ColoredBarItemDelegate(QStyledItemDelegate): 
    1962     """ Item delegate that can also draw a distribution bar 
     1966    """ Item delegate that can also draws a distribution bar 
    19631967    """ 
    19641968    def __init__(self, parent=None, decimals=3, color=Qt.red): 
Note: See TracChangeset for help on using the changeset viewer.