-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.py
40 lines (32 loc) · 894 Bytes
/
styles.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class Styles:
# Colors
colors = {
'background': 'black',
'foreground': 'white'
}
# object styles
object_styles = {
'label': {
'bg': colors['background'],
'fg': colors['foreground'],
'font': 'none 12 bold',
'text': 'Add Label Text'
},
'entry': {
'width': 30,
'bg': colors['background'],
'fg': colors['foreground']
},
'text': {
'height': 20,
'width': 60,
'bg': colors['background'],
'fg': colors['foreground']
}
}
def __new__(cls, style_name, other_styles=None):
cls.style_name = style_name
default_styles = cls.object_styles[style_name].copy()
if other_styles:
default_styles.update(other_styles)
return default_styles