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/document/quickmenu.py

    r11507 r11508  
    3636from ..gui.lineedit import LineEdit 
    3737from ..gui.tooltree import ToolTree, FlattenedTreeItemModel 
    38 from ..gui.toolgrid import ToolButtonEventListener 
    39 from ..gui.toolbox import create_tab_gradient 
    40 from ..gui.utils import StyledWidget_paintEvent 
     38from ..gui.utils import StyledWidget_paintEvent, create_css_gradient 
    4139 
    4240from ..registry.qt import QtWidgetRegistry 
     
    13211319 
    13221320        self.move(x, y) 
    1323  
    1324  
    1325 def create_css_gradient(base_color): 
    1326     """ 
    1327     Create a Qt css linear gradient fragment based on the `base_color`. 
    1328     """ 
    1329     grad = create_tab_gradient(base_color) 
    1330     stops = grad.stops() 
    1331     stops = "\n".join("    stop: {0:f} {1}".format(stop, color.name()) 
    1332                       for stop, color in stops) 
    1333     return ("qlineargradient(\n" 
    1334             "    x1: 0, y1: 0, x2: 0, y2: 1,\n" 
    1335             "{0})").format(stops) 
Note: See TracChangeset for help on using the changeset viewer.