gui-utilities 1.3.6__tar.gz → 1.3.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gui-utilities might be problematic. Click here for more details.
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/PKG-INFO +1 -1
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/gui_utilities.py +46 -21
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities.egg-info/PKG-INFO +1 -1
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/pyproject.toml +1 -1
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/LICENSE +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/README.md +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/icons/focused_hide_text_icon.png +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/icons/focused_show_text_icon.png +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/icons/hide_text_icon.png +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/icons/show_text_icon.png +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities/tlds/tlds_list.txt +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities.egg-info/SOURCES.txt +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities.egg-info/dependency_links.txt +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities.egg-info/requires.txt +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/gui_utilities.egg-info/top_level.txt +0 -0
- {gui_utilities-1.3.6 → gui_utilities-1.3.13}/setup.cfg +0 -0
|
@@ -176,7 +176,11 @@ def create_label(
|
|
|
176
176
|
padding_bottom = None,
|
|
177
177
|
border_width = 0,
|
|
178
178
|
border_color = "#ffffff",
|
|
179
|
-
border_radius = 0
|
|
179
|
+
border_radius = 0,
|
|
180
|
+
hover_background_color = "#1e1e1e",
|
|
181
|
+
pressed_background_color = "#1e1e1e",
|
|
182
|
+
disabled_font_color = "#888888",
|
|
183
|
+
disabled_background_color = "#2d2d2d"
|
|
180
184
|
):
|
|
181
185
|
label = QLabel(text)
|
|
182
186
|
padding_left_value = padding_left if padding_left is not None else padding
|
|
@@ -184,17 +188,29 @@ def create_label(
|
|
|
184
188
|
padding_right_value = padding_right if padding_right is not None else padding
|
|
185
189
|
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
186
190
|
style = f"""
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
QLabel {{
|
|
192
|
+
font-family: {font_family};
|
|
193
|
+
font-size: {font_size}px;
|
|
194
|
+
color: {font_color};
|
|
195
|
+
font-weight: {font_weight};
|
|
196
|
+
background-color: {background_color};
|
|
197
|
+
padding-left: {padding_left_value}px;
|
|
198
|
+
padding-top: {padding_top_value}px;
|
|
199
|
+
padding-right: {padding_right_value}px;
|
|
200
|
+
padding-bottom: {padding_bottom_value}px;
|
|
201
|
+
border: {border_width}px solid {border_color};
|
|
202
|
+
border-radius: {border_radius}px;
|
|
203
|
+
}}
|
|
204
|
+
QLabel:hover{{
|
|
205
|
+
background-color: {hover_background_color};
|
|
206
|
+
}}
|
|
207
|
+
QLabel:pressed{{
|
|
208
|
+
background-color: {pressed_background_color};
|
|
209
|
+
}}
|
|
210
|
+
QLabel:disabled{{
|
|
211
|
+
color: {disabled_font_color};
|
|
212
|
+
background-color: {disabled_background_color};
|
|
213
|
+
}}
|
|
198
214
|
"""
|
|
199
215
|
label.setStyleSheet(style)
|
|
200
216
|
return label
|
|
@@ -228,14 +244,26 @@ def create_button(
|
|
|
228
244
|
button = QPushButton()
|
|
229
245
|
button.setMaximumWidth(360)
|
|
230
246
|
main_layout = QVBoxLayout(button)
|
|
231
|
-
|
|
247
|
+
main_layout.setContentsMargins(0, 0, 0, 0)
|
|
248
|
+
label = create_label(
|
|
249
|
+
text = text,
|
|
250
|
+
font_size = font_size,
|
|
251
|
+
font_color = font_color,
|
|
252
|
+
font_weight = "bold",
|
|
253
|
+
background_color = background_color,
|
|
254
|
+
padding = padding,
|
|
255
|
+
padding_left = padding_left,
|
|
256
|
+
padding_top = padding_top,
|
|
257
|
+
padding_right = padding_right,
|
|
258
|
+
padding_bottom = padding_bottom,
|
|
259
|
+
hover_background_color = hover_background_color,
|
|
260
|
+
pressed_background_color = pressed_background_color,
|
|
261
|
+
disabled_font_color = disabled_font_color,
|
|
262
|
+
disabled_background_color = disabled_background_color
|
|
263
|
+
)
|
|
232
264
|
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
233
265
|
label.setWordWrap(True)
|
|
234
266
|
main_layout.addWidget(label)
|
|
235
|
-
padding_left_value = padding_left if padding_left is not None else padding
|
|
236
|
-
padding_top_value = padding_top if padding_top is not None else padding
|
|
237
|
-
padding_right_value = padding_right if padding_right is not None else padding
|
|
238
|
-
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
239
267
|
style_sheet = f"""
|
|
240
268
|
QPushButton {{
|
|
241
269
|
font-family: {font_family};
|
|
@@ -243,10 +271,7 @@ def create_button(
|
|
|
243
271
|
color: {font_color};
|
|
244
272
|
font-weight: {font_weight};
|
|
245
273
|
background-color: {background_color};
|
|
246
|
-
padding
|
|
247
|
-
padding-top: {padding_top_value}px;
|
|
248
|
-
padding-right: {padding_right_value}px;
|
|
249
|
-
padding-bottom: {padding_bottom_value}px;
|
|
274
|
+
padding: 0px;
|
|
250
275
|
border: {border_width}px solid {border_color};
|
|
251
276
|
border-radius: {border_radius}px;
|
|
252
277
|
}}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|