-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.py
189 lines (167 loc) · 4.22 KB
/
style.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
import os
# Define styles, colors, and image paths
# Colors
DARK_GREY = '#1F1F1F' # Dark grey color for backgrounds
LIGHTER_GREY = '#363636' # Lighter grey color for buttons
LIGHTER_DARK_GREY = '#2B2B2B' # Slightly lighter dark grey for drop areas
WHITE = '#FFFFFF' # White color for text fields and button text
FONT_COLOR = '#A8A8A8' # Font color
ICON_COLOR = 'lightgrey' # Initial color for icon
ICON_HOVER_COLOR = 'white' # Hover color for icon
ICON_PRESSED_COLOR = 'grey' # Pressed color for icon
LIGHT_BORDER_COLOR = '#CCCCCC' # Light border color for editable textboxes
LIGHT_RED = "#ff0000"
LIGHTER_RED = "rgba(255, 204, 204, 0.2)" # Semi-transparent red for hover
# Font settings
BASE_FONT = "Arial"
BASE_FONT_SIZE = "14px"
BASE_FONT_COLOR = FONT_COLOR
# Styles
MAIN_WINDOW_STYLE = """
QFrame#MainBackground {
background-color: %s;
border-radius: 5px;
}
""" % DARK_GREY
DRAGGABLE_WIDGET_STYLE = """
QWidget {
background-color: %s;
border-radius: 10px;
border: 1px solid #CCCCCC;
margin-bottom: 1px;
}
""" % LIGHTER_DARK_GREY
MAIN_BACKGROUND_STYLE = """
QFrame#MainBackground {
background-color: %s;
border-radius: 5px;
}
""" % DARK_GREY
CONTENT_BOX_STYLE = """
background-color: %s;
border-radius: 10px;
padding: 5px;
""" % LIGHTER_DARK_GREY
ICON_STYLE = """
QPushButton {
background-color: transparent;
border: none;
padding: 5px;
}
QPushButton:hover {
background-color: rgba(255, 255, 255, 50);
}
QPushButton:pressed {
background-color: rgba(255, 255, 255, 100);
}
"""
BUTTON_STYLE = """
QPushButton {
background-color: %s;
color: %s;
border: none;
border-radius: 5px;
padding: 10px;
font-family: %s;
font-size: %s;
}
QPushButton:hover {
background-color: #444444;
}
""" % (LIGHTER_GREY, WHITE, BASE_FONT, BASE_FONT_SIZE)
LINE_EDIT_STYLE = """
QLineEdit {
background-color: %s;
border: none;
border-radius: 5px;
padding: 5px;
color: %s;
font-family: %s;
font-size: %s;
}
""" % (LIGHTER_GREY, FONT_COLOR, BASE_FONT, BASE_FONT_SIZE)
LINE_EDIT_STYLE_EDITABLE = """
QLineEdit {
background-color: %s;
border: 1px solid %s;
border-radius: 5px;
padding: 5px;
color: %s;
font-family: %s;
font-size: %s;
}
""" % (LIGHTER_GREY, LIGHT_BORDER_COLOR, FONT_COLOR, BASE_FONT, BASE_FONT_SIZE)
# style.py
SEARCH_BAR_STYLE = """
QLineEdit {
height: 30px;
border: 1px solid #2E2E2E;
border-radius: 5px;
padding: 5px;
background-color: #2E2E2E;
color: #FFFFFF;
}
"""
LABEL_STYLE = """
QLabel {
color: lightgrey;
font-family: Calibri;
font-size: 10pt;
padding: 5px;
}
"""
SCROLL_AREA_STYLE = """
QScrollArea {
border: none;
}
QScrollBar:vertical {
border: none;
background: LIGHTER_GREY;
width: 10px;
margin: 0px 0px 0px 0px;
border-radius: 5px;
}
QScrollBar::handle:vertical {
background: LIGHTER_GREY;
min-height: 20px;
border-radius: 5px;
}
QScrollBar::add-line:vertical {
border: none;
background: #2B2B2B;
height: 10px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
border: none;
background: #2B2B2B;
height: 10px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
background: none;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
"""
DELETE_DROP_AREA_STYLE = """
QWidget {
background-color: %s;
border-radius: 10px;
padding: 5px;
}
""" % LIGHT_RED
DELETE_DROP_AREA_HOVER_STYLE = """
QWidget {
background-color: %s;
border-radius: 10px;
padding: 5px;
}
""" % LIGHTER_RED
# Paths to images
MINIMIZE_ICON_PATH = os.path.join(os.path.dirname(__file__), 'resources/icons/minimize.svg')
MAXIMIZE_ICON_PATH = os.path.join(os.path.dirname(__file__), 'resources/icons/maximize.svg')
CLOSE_ICON_PATH = os.path.join(os.path.dirname(__file__), 'resources/icons/close.svg')