source: orange/orange/OrangeWidgets/plot/owpalette.py @ 8172:442f361f4e58

Revision 8172:442f361f4e58, 680 bytes checked in by Noughmad <Noughmad@…>, 3 years ago (diff)

Copy the plot module to trunk

Line 
1from PyQt4.QtGui import QPalette
2from PyQt4.QtCore import Qt
3
4def create_palette(colors):
5    p = QPalette()
6    for role, color in colors.iteritems():
7        p.setColor(role, color)
8    return p
9
10class OWPalette:
11    """
12        These constants are defined here so that they can be changed without extensive changes to the visualizations
13    """
14    Canvas = QPalette.Base
15    Grid = QPalette.Button
16    Text = QPalette.Text
17    Data = QPalette.Text
18    Axis = QPalette.Text
19   
20    System = QPalette()
21    Light = create_palette({ Canvas : Qt.white, Grid : Qt.lightGray, Text : Qt.black })
22    Dark = create_palette({ Canvas : Qt.black, Grid : Qt.darkGray, Text : Qt.white })
Note: See TracBrowser for help on using the repository browser.