-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant.py
164 lines (140 loc) · 4.04 KB
/
constant.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
class VALUE_TYPE_CODE:
TEXT = 'text'
INT = 'int'
FLOAT = 'float'
IMAGE = 'image'
class FILTER_CODE:
NO_FILTER = 'no filter'
CATEGORY = 'category'
# Default values
DEFAULT_CODE_FILTER = FILTER_CODE.NO_FILTER
DEFAULT_CODE_VALUE_TYPE = VALUE_TYPE_CODE.TEXT
DEFAULT_COLUMN_NUMBER = 5
DEFAULT_ROW_NUMBER = 4
# Detail View
DETAIL_VIEW_SPACING = 5
DETAIL_VIEW_SPAN_HORIZONTAL = 150
DETAIL_VIEW_SPAN_VERTICAL = 100
DETAIL_VIEW_TITLE_FONT_SIZE = 15
# Color
COLOR_BLACK = (0, 0, 0)
COLOR_GREY_DARK = (40, 55, 71)
COLOR_GREY_MEDIUM = (93, 109, 126)
COLOR_GREY_QUITE_LIGHT = (133, 146, 158)
COLOR_GREY_LIGHT = (174, 182, 191)
COLOR_GREY_VERY_LIGHT = (214, 219, 223)
COLOR_GREY_ULTRA_LIGHT = (235, 237, 239)
COLOR_WHITE = (255, 255, 255)
# Button
BUTTON_BORDER_WIDTH = 1
BUTTON_COLOR_BACKGROUND = COLOR_GREY_VERY_LIGHT
BUTTON_COLOR_BACKGROUND_DISABLED = COLOR_GREY_VERY_LIGHT
BUTTON_COLOR_BACKGROUND_HOVER = COLOR_GREY_LIGHT
BUTTON_COLOR_BACKGROUND_PRESSED = COLOR_GREY_DARK
BUTTON_COLOR_BORDER_DISABLED = COLOR_GREY_QUITE_LIGHT
BUTTON_COLOR_BORDER_ENABLED = COLOR_BLACK
BUTTON_COLOR_TEXT = COLOR_BLACK
BUTTON_COLOR_TEXT_DISABLED = COLOR_GREY_QUITE_LIGHT
BUTTON_COLOR_TEXT_HOVER = COLOR_BLACK
BUTTON_COLOR_TEXT_PRESSED = COLOR_WHITE
BUTTON_FONT_SIZE = 9
BUTTON_MARGIN = 2
BUTTON_PADDING = 4
BUTTON_RADIUS = (10, 7)
# Check Box
CHECK_BOX_BORDER_WIDTH = 2
CHECK_BOX_COLOR_BACKGROUND = COLOR_GREY_LIGHT
CHECK_BOX_COLOR_BACKGROUND_HOVER = COLOR_GREY_QUITE_LIGHT
CHECK_BOX_COLOR_BACKGROUND_PRESSED = COLOR_GREY_DARK
CHECK_BOX_COLOR_BORDER = COLOR_GREY_DARK
CHECK_BOX_COLOR_BORDER_DISABLED = COLOR_GREY_QUITE_LIGHT
CHECK_BOX_COLOR_TEXT = COLOR_BLACK
CHECK_BOX_COLOR_TEXT_DISABLED = COLOR_GREY_QUITE_LIGHT
CHECK_BOX_FONT_SIZE = 9
CHECK_BOX_RADIUS = 4.0
CHECK_BOX_SIZE = 10
# Combo Box
COMBO_BOX_BORDER_WIDTH = 1
COMBO_BOX_COLOR_BACKGROUND = COLOR_GREY_VERY_LIGHT
COMBO_BOX_COLOR_BACKGROUND_DISABLED = COLOR_GREY_VERY_LIGHT
COMBO_BOX_COLOR_BACKGROUND_HOVER = COLOR_GREY_LIGHT
COMBO_BOX_COLOR_BACKGROUND_SELECTED = COLOR_GREY_DARK
COMBO_BOX_COLOR_BORDER = COLOR_BLACK
COMBO_BOX_COLOR_BORDER_DISABLED = COLOR_GREY_QUITE_LIGHT
COMBO_BOX_COLOR_TEXT = COLOR_BLACK
COMBO_BOX_COLOR_TEXT_DISABLED = COLOR_GREY_QUITE_LIGHT
COMBO_BOX_COLOR_TEXT_SELECTED = COLOR_WHITE
COMBO_BOX_FONT_SIZE = 9
COMBO_BOX_PADDING = (2, 18, 2, 3)
COMBO_BOX_PADDING_RIGHT_ARROW = 4
COMBO_BOX_RADIUS = 6.0
# Line Edit
LINE_EDIT_BORDER_WIDTH = 0
LINE_EDIT_COLOR_BACKGROUND = COLOR_GREY_LIGHT
LINE_EDIT_COLOR_BACKGROUND_SELECTION = COLOR_GREY_DARK
LINE_EDIT_FONT_SIZE = 11
LINE_EDIT_PADDING_HORIZONTAL = 4
LINE_EDIT_PADDING_VERTICAL = 3
LINE_EDIT_RADIUS = 5
# Display Widget
DW_COLOR_DARK = COLOR_GREY_DARK
DW_COLOR_LIGHT = COLOR_GREY_MEDIUM
DW_MARGIN = 10
DW_PAINT_LINE_GAP = 5
DW_PAINT_WIDTH = 4
DW_RADIUS = 10.0
DW_SPACING = 16
DW_TITLE_FONT_SIZE = 11
# Extend Widget
EW_BUTTON_STYLE = 2
EW_COLOR_DARK = COLOR_GREY_DARK
EW_COLOR_LIGHT = COLOR_GREY_MEDIUM
EW_ICON_SIZE = 10
EW_MARGIN = 10
EW_PAINT_LINE_GAP = 5
EW_PAINT_WIDTH = 4
EW_RADIUS = 10.0
EW_SPACING = 16
EW_TITLE_FONT_SIZE = 11
# Tab Widget
TW_BORDER_WIDTH = 1
TW_COLOR_BACKGROUND = COLOR_WHITE
TW_COLOR_BACKGROUND_TAB = COLOR_GREY_VERY_LIGHT
TW_COLOR_BACKGROUND_TAB_SELECTED = COLOR_WHITE
TW_COLOR_BORDER = COLOR_BLACK
TW_COLOR_TEXT_TAB = COLOR_GREY_MEDIUM
TW_COLOR_TEXT_TAB_HOVER = COLOR_BLACK
TW_COLOR_TEXT_TAB_SELECTED = COLOR_BLACK
TW_FONT_SIZE = 11
TW_MARGIN = 0
TW_PADDING = (7, 8, 7, 8)
TW_RADIUS = 10
TW_RADIUS_TAB = 6
# View Widget
VW_FONT_SIZE = 15
# Splitter
SPLITTER_HANDLE_WIDTH = 20
SPLITTER_COLOR_HANDLE = COLOR_WHITE
SPLITTER_COLOR_BACKGROUND = COLOR_WHITE
# Filter Area
FA_COLOR_BACKGROUND = COLOR_GREY_ULTRA_LIGHT
FA_RADIUS = 20
# Article Area
AA_COLOR_BACKGROUND = COLOR_GREY_ULTRA_LIGHT
AA_RADIUS = 20
# Component Settings Area
CS_COLOR_BACKGROUND = COLOR_GREY_ULTRA_LIGHT
CS_RADIUS = 20
# Extend Component Widget
ECW_FONT_SIZE = 9
# Dialog
DIALOG_FONT_SIZE = 9
# Scroll Area
SA_BORDER_WIDTH = 0
SA_COLOR_BACKGROUND = COLOR_WHITE
SA_COLOR_HANDLE = COLOR_GREY_QUITE_LIGHT
SA_MARGIN = (0, 2, 0, 2)
SA_RADIUS = 4
SA_WIDTH = 12
# Other
CATALOG_NAME_MAX_LENGTH = 20