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

Moved gradient functions into gui.utils.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/gui/toolbox.py

    r11441 r11508  
    1515    QWidget, QFrame, QSizePolicy, QIcon, QFontMetrics, QPainter, QStyle, 
    1616    QStyleOptionToolButton, QStyleOptionToolBoxV2, QPalette, QBrush, QPen, 
    17     QLinearGradient, QColor, QScrollArea, QVBoxLayout, QToolButton, 
    18     QAction, QActionGroup 
     17    QColor, QScrollArea, QVBoxLayout, QToolButton, QAction, QActionGroup 
    1918) 
    2019 
     
    3736 
    3837FOCUS_OUTLINE_COLOR = "#609ED7" 
    39  
    40  
    41 def create_tab_gradient(base_color): 
    42     """ 
    43     Create a default background gradient for a tab button from a single 
    44     color. 
    45  
    46     """ 
    47     grad = QLinearGradient(0, 0, 0, 1) 
    48     grad.setStops([(0.0, base_color), 
    49                    (0.5, base_color), 
    50                    (0.8, base_color.darker(105)), 
    51                    (1.0, base_color.darker(110)), 
    52                    ]) 
    53     grad.setCoordinateMode(QLinearGradient.ObjectBoundingMode) 
    54     return grad 
    5538 
    5639 
Note: See TracChangeset for help on using the changeset viewer.