gui-utilities 1.2.6__py3-none-any.whl → 1.3.9__py3-none-any.whl
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/gui_utilities.py +212 -31
- {gui_utilities-1.2.6.dist-info → gui_utilities-1.3.9.dist-info}/METADATA +1 -1
- {gui_utilities-1.2.6.dist-info → gui_utilities-1.3.9.dist-info}/RECORD +6 -6
- {gui_utilities-1.2.6.dist-info → gui_utilities-1.3.9.dist-info}/WHEEL +0 -0
- {gui_utilities-1.2.6.dist-info → gui_utilities-1.3.9.dist-info}/licenses/LICENSE +0 -0
- {gui_utilities-1.2.6.dist-info → gui_utilities-1.3.9.dist-info}/top_level.txt +0 -0
gui_utilities/gui_utilities.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from PyQt6.QtCore import Qt, QObject, QEvent, QSize
|
|
2
2
|
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QLineEdit, QComboBox, QDialog, QToolButton, QWidgetAction, QCheckBox, QTableWidget, QHeaderView
|
|
3
|
-
from PyQt6.QtGui import QIcon
|
|
3
|
+
from PyQt6.QtGui import QIcon, QFont, QFontMetrics
|
|
4
4
|
import re
|
|
5
5
|
import requests
|
|
6
6
|
import importlib.resources
|
|
@@ -27,6 +27,10 @@ def create_form(
|
|
|
27
27
|
title_font_color = "#ffffff",
|
|
28
28
|
title_background_color = "#1e1e1e",
|
|
29
29
|
title_padding = 15,
|
|
30
|
+
title_padding_left = None,
|
|
31
|
+
title_padding_top = None,
|
|
32
|
+
title_padding_right = None,
|
|
33
|
+
title_padding_bottom = None,
|
|
30
34
|
title_border_width = 0,
|
|
31
35
|
title_border_color = "#ffffff",
|
|
32
36
|
title_border_radius = 0
|
|
@@ -40,6 +44,10 @@ def create_form(
|
|
|
40
44
|
font_color = title_font_color,
|
|
41
45
|
background_color = title_background_color,
|
|
42
46
|
padding = title_padding,
|
|
47
|
+
padding_left = title_padding_left,
|
|
48
|
+
padding_top = title_padding_top,
|
|
49
|
+
padding_right = title_padding_right,
|
|
50
|
+
padding_bottom = title_padding_bottom,
|
|
43
51
|
border_width = title_border_width,
|
|
44
52
|
border_color = title_border_color,
|
|
45
53
|
border_radius = title_border_radius
|
|
@@ -77,6 +85,46 @@ def create_form(
|
|
|
77
85
|
body_layout.setStretch(1, 4)
|
|
78
86
|
return main_layout
|
|
79
87
|
|
|
88
|
+
def create_header(
|
|
89
|
+
title,
|
|
90
|
+
margin_left = 25,
|
|
91
|
+
margin_top = 25,
|
|
92
|
+
margin_right = 25,
|
|
93
|
+
margin_bottom = 25,
|
|
94
|
+
title_font_family = "Segoe UI",
|
|
95
|
+
title_font_size = 36,
|
|
96
|
+
title_font_color = "#ffffff",
|
|
97
|
+
title_background_color = "#1e1e1e",
|
|
98
|
+
title_padding = 15,
|
|
99
|
+
title_padding_left = None,
|
|
100
|
+
title_padding_top = None,
|
|
101
|
+
title_padding_right = None,
|
|
102
|
+
title_padding_bottom = None,
|
|
103
|
+
title_border_width = 0,
|
|
104
|
+
title_border_color = "#ffffff",
|
|
105
|
+
title_border_radius = 0
|
|
106
|
+
):
|
|
107
|
+
main_layout = QVBoxLayout()
|
|
108
|
+
main_layout.setContentsMargins(margin_left, margin_top, margin_right, margin_bottom)
|
|
109
|
+
title_layout = create_title(
|
|
110
|
+
text = title,
|
|
111
|
+
font_family = title_font_family,
|
|
112
|
+
font_size = title_font_size,
|
|
113
|
+
font_color = title_font_color,
|
|
114
|
+
background_color = title_background_color,
|
|
115
|
+
padding = title_padding,
|
|
116
|
+
padding_left = title_padding_left,
|
|
117
|
+
padding_top = title_padding_top,
|
|
118
|
+
padding_right = title_padding_right,
|
|
119
|
+
padding_bottom = title_padding_bottom,
|
|
120
|
+
border_width = title_border_width,
|
|
121
|
+
border_color = title_border_color,
|
|
122
|
+
border_radius = title_border_radius
|
|
123
|
+
)
|
|
124
|
+
main_layout.addLayout(title_layout)
|
|
125
|
+
main_layout.addStretch()
|
|
126
|
+
return main_layout
|
|
127
|
+
|
|
80
128
|
def create_title(
|
|
81
129
|
text,
|
|
82
130
|
font_family = "Segoe UI",
|
|
@@ -84,6 +132,10 @@ def create_title(
|
|
|
84
132
|
font_color = "#ffffff",
|
|
85
133
|
background_color = "#1e1e1e",
|
|
86
134
|
padding = 15,
|
|
135
|
+
padding_left = None,
|
|
136
|
+
padding_top = None,
|
|
137
|
+
padding_right = None,
|
|
138
|
+
padding_bottom = None,
|
|
87
139
|
border_width = 0,
|
|
88
140
|
border_color = "#ffffff",
|
|
89
141
|
border_radius = 0
|
|
@@ -99,6 +151,10 @@ def create_title(
|
|
|
99
151
|
font_weight = "bold",
|
|
100
152
|
background_color = background_color,
|
|
101
153
|
padding = padding,
|
|
154
|
+
padding_left = padding_left,
|
|
155
|
+
padding_top = padding_top,
|
|
156
|
+
padding_right = padding_right,
|
|
157
|
+
padding_bottom = padding_bottom,
|
|
102
158
|
border_width = border_width,
|
|
103
159
|
border_color = border_color,
|
|
104
160
|
border_radius = border_radius
|
|
@@ -114,20 +170,37 @@ def create_label(
|
|
|
114
170
|
font_weight = "normal",
|
|
115
171
|
background_color = "#1e1e1e",
|
|
116
172
|
padding = 15,
|
|
173
|
+
padding_left = None,
|
|
174
|
+
padding_top = None,
|
|
175
|
+
padding_right = None,
|
|
176
|
+
padding_bottom = None,
|
|
117
177
|
border_width = 0,
|
|
118
178
|
border_color = "#ffffff",
|
|
119
|
-
border_radius = 0
|
|
179
|
+
border_radius = 0,
|
|
180
|
+
hover_background_color = "#1e1e1e"
|
|
120
181
|
):
|
|
121
182
|
label = QLabel(text)
|
|
183
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
184
|
+
padding_top_value = padding_top if padding_top is not None else padding
|
|
185
|
+
padding_right_value = padding_right if padding_right is not None else padding
|
|
186
|
+
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
122
187
|
style = f"""
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
188
|
+
QLabel {{
|
|
189
|
+
font-family: {font_family};
|
|
190
|
+
font-size: {font_size}px;
|
|
191
|
+
color: {font_color};
|
|
192
|
+
font-weight: {font_weight};
|
|
193
|
+
background-color: {background_color};
|
|
194
|
+
padding-left: {padding_left_value}px;
|
|
195
|
+
padding-top: {padding_top_value}px;
|
|
196
|
+
padding-right: {padding_right_value}px;
|
|
197
|
+
padding-bottom: {padding_bottom_value}px;
|
|
198
|
+
border: {border_width}px solid {border_color};
|
|
199
|
+
border-radius: {border_radius}px;
|
|
200
|
+
}}
|
|
201
|
+
QLabel:hover{{
|
|
202
|
+
background-color: {hover_background_color};
|
|
203
|
+
}}
|
|
131
204
|
"""
|
|
132
205
|
label.setStyleSheet(style)
|
|
133
206
|
return label
|
|
@@ -140,6 +213,10 @@ def create_button(
|
|
|
140
213
|
font_weight = "bold",
|
|
141
214
|
background_color = "#1e1e1e",
|
|
142
215
|
padding = 15,
|
|
216
|
+
padding_left = None,
|
|
217
|
+
padding_top = None,
|
|
218
|
+
padding_right = None,
|
|
219
|
+
padding_bottom = None,
|
|
143
220
|
border_width = 2,
|
|
144
221
|
border_color = "#5c5c5c",
|
|
145
222
|
border_radius = 0,
|
|
@@ -154,7 +231,17 @@ def create_button(
|
|
|
154
231
|
disabled_border_width = 2,
|
|
155
232
|
disabled_border_color = "#4a4a4a"
|
|
156
233
|
):
|
|
157
|
-
button = QPushButton(
|
|
234
|
+
button = QPushButton()
|
|
235
|
+
button.setMaximumWidth(360)
|
|
236
|
+
main_layout = QVBoxLayout(button)
|
|
237
|
+
label = create_label(text = text, font_size = 16, font_weight = "bold", padding = 5, hover_background_color = "#333333")
|
|
238
|
+
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
239
|
+
label.setWordWrap(True)
|
|
240
|
+
main_layout.addWidget(label)
|
|
241
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
242
|
+
padding_top_value = padding_top if padding_top is not None else padding
|
|
243
|
+
padding_right_value = padding_right if padding_right is not None else padding
|
|
244
|
+
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
158
245
|
style_sheet = f"""
|
|
159
246
|
QPushButton {{
|
|
160
247
|
font-family: {font_family};
|
|
@@ -162,7 +249,10 @@ def create_button(
|
|
|
162
249
|
color: {font_color};
|
|
163
250
|
font-weight: {font_weight};
|
|
164
251
|
background-color: {background_color};
|
|
165
|
-
padding: {
|
|
252
|
+
padding-left: {padding_left_value}px;
|
|
253
|
+
padding-top: {padding_top_value}px;
|
|
254
|
+
padding-right: {padding_right_value}px;
|
|
255
|
+
padding-bottom: {padding_bottom_value}px;
|
|
166
256
|
border: {border_width}px solid {border_color};
|
|
167
257
|
border-radius: {border_radius}px;
|
|
168
258
|
}}
|
|
@@ -191,6 +281,10 @@ def create_text_box(
|
|
|
191
281
|
font_weight = "normal",
|
|
192
282
|
background_color = "#1e1e1e",
|
|
193
283
|
padding = 15,
|
|
284
|
+
padding_left = None,
|
|
285
|
+
padding_top = None,
|
|
286
|
+
padding_right = None,
|
|
287
|
+
padding_bottom = None,
|
|
194
288
|
border_width = 2,
|
|
195
289
|
border_color = "#5c5c5c",
|
|
196
290
|
border_radius = 0,
|
|
@@ -212,6 +306,10 @@ def create_text_box(
|
|
|
212
306
|
):
|
|
213
307
|
text_box = QLineEdit()
|
|
214
308
|
text_box.setPlaceholderText(placeholder_text)
|
|
309
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
310
|
+
padding_top_value = padding_top if padding_top is not None else padding
|
|
311
|
+
padding_right_value = padding_right if padding_right is not None else padding
|
|
312
|
+
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
215
313
|
style_sheet = f"""
|
|
216
314
|
QLineEdit {{
|
|
217
315
|
font-family: {font_family};
|
|
@@ -219,7 +317,10 @@ def create_text_box(
|
|
|
219
317
|
color: {font_color};
|
|
220
318
|
font-weight: {font_weight};
|
|
221
319
|
background-color: {background_color};
|
|
222
|
-
padding: {
|
|
320
|
+
padding-left: {padding_left_value}px;
|
|
321
|
+
padding-top: {padding_top_value}px;
|
|
322
|
+
padding-right: {padding_right_value}px;
|
|
323
|
+
padding-bottom: {padding_bottom_value}px;
|
|
223
324
|
border: {border_width}px solid {border_color};
|
|
224
325
|
border-radius: {border_radius}px;
|
|
225
326
|
}}
|
|
@@ -294,6 +395,10 @@ def create_combo_box(
|
|
|
294
395
|
font_color = "#ffffff",
|
|
295
396
|
background_color = "#1e1e1e",
|
|
296
397
|
padding = 15,
|
|
398
|
+
padding_left = None,
|
|
399
|
+
padding_top = None,
|
|
400
|
+
padding_right = None,
|
|
401
|
+
padding_bottom = None,
|
|
297
402
|
border_width = 2,
|
|
298
403
|
border_color = "#5c5c5c",
|
|
299
404
|
border_radius = 0,
|
|
@@ -315,6 +420,11 @@ def create_combo_box(
|
|
|
315
420
|
combo_box.addItems(items)
|
|
316
421
|
combo_box.setCurrentIndex(-1)
|
|
317
422
|
|
|
423
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
424
|
+
padding_top_value = padding_top if padding_top is not None else padding
|
|
425
|
+
padding_right_value = padding_right if padding_right is not None else padding
|
|
426
|
+
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
427
|
+
|
|
318
428
|
def get_stylesheet(font_color):
|
|
319
429
|
return f"""
|
|
320
430
|
QComboBox {{
|
|
@@ -322,7 +432,10 @@ def create_combo_box(
|
|
|
322
432
|
font-size: {font_size}px;
|
|
323
433
|
color: {font_color};
|
|
324
434
|
background-color: {background_color};
|
|
325
|
-
padding: {
|
|
435
|
+
padding-left: {padding_left_value}px;
|
|
436
|
+
padding-top: {padding_top_value}px;
|
|
437
|
+
padding-right: {padding_right_value}px;
|
|
438
|
+
padding-bottom: {padding_bottom_value}px;
|
|
326
439
|
border: {border_width}px solid {border_color};
|
|
327
440
|
border-radius: {border_radius}px;
|
|
328
441
|
}}
|
|
@@ -361,6 +474,10 @@ def create_checkbox(
|
|
|
361
474
|
font_color = "#ffffff",
|
|
362
475
|
background_color = "#1e1e1e",
|
|
363
476
|
padding = 5,
|
|
477
|
+
padding_left = None,
|
|
478
|
+
padding_top = None,
|
|
479
|
+
padding_right = None,
|
|
480
|
+
padding_bottom = None,
|
|
364
481
|
indicator_background_color = "#1e1e1e",
|
|
365
482
|
indicator_border_width = 1,
|
|
366
483
|
indicator_border_color = "#5c5c5c",
|
|
@@ -380,13 +497,20 @@ def create_checkbox(
|
|
|
380
497
|
disabled_border_color = "#4a4a4a"
|
|
381
498
|
):
|
|
382
499
|
check_box = QCheckBox(text)
|
|
500
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
501
|
+
padding_top_value = padding_top if padding_top is not None else padding
|
|
502
|
+
padding_right_value = padding_right if padding_right is not None else padding
|
|
503
|
+
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
383
504
|
style_sheet = f"""
|
|
384
505
|
QCheckBox {{
|
|
385
506
|
font-family: {font_family};
|
|
386
507
|
font-size: {font_size}px;
|
|
387
508
|
color: {font_color};
|
|
388
509
|
background-color: {background_color};
|
|
389
|
-
padding: {
|
|
510
|
+
padding-left: {padding_left_value}px;
|
|
511
|
+
padding-top: {padding_top_value}px;
|
|
512
|
+
padding-right: {padding_right_value}px;
|
|
513
|
+
padding-bottom: {padding_bottom_value}px;
|
|
390
514
|
}}
|
|
391
515
|
QCheckBox::indicator {{
|
|
392
516
|
image: none;
|
|
@@ -415,16 +539,16 @@ def create_checkbox(
|
|
|
415
539
|
background-color: {disabled_background_color};
|
|
416
540
|
border: {disabled_border_width}px solid {disabled_border_color};
|
|
417
541
|
}}
|
|
418
|
-
"""
|
|
542
|
+
"""
|
|
419
543
|
check_box.setStyleSheet(style_sheet)
|
|
420
544
|
return check_box
|
|
421
545
|
|
|
422
546
|
def create_information_message_box(
|
|
423
547
|
text,
|
|
424
|
-
top_margin = 25,
|
|
425
|
-
bottom_margin = 25,
|
|
426
548
|
left_margin = 25,
|
|
549
|
+
top_margin = 25,
|
|
427
550
|
right_margin = 25,
|
|
551
|
+
bottom_margin = 25,
|
|
428
552
|
spacing = 10,
|
|
429
553
|
background_color = "#1e1e1e",
|
|
430
554
|
border_width = 2,
|
|
@@ -434,6 +558,10 @@ def create_information_message_box(
|
|
|
434
558
|
label_font_size = 14,
|
|
435
559
|
label_font_color = "#ffffff",
|
|
436
560
|
label_padding = 15,
|
|
561
|
+
label_padding_left = None,
|
|
562
|
+
label_padding_top = None,
|
|
563
|
+
label_padding_right = None,
|
|
564
|
+
label_padding_bottom = None,
|
|
437
565
|
label_border_width = 0,
|
|
438
566
|
label_border_color = "#ffffff",
|
|
439
567
|
label_border_radius = 0,
|
|
@@ -443,6 +571,10 @@ def create_information_message_box(
|
|
|
443
571
|
button_font_color = "#ffffff",
|
|
444
572
|
button_background_color = "#1e1e1e",
|
|
445
573
|
button_padding = 15,
|
|
574
|
+
button_padding_left = None,
|
|
575
|
+
button_padding_top = None,
|
|
576
|
+
button_padding_right = None,
|
|
577
|
+
button_padding_bottom = None,
|
|
446
578
|
button_border_width = 2,
|
|
447
579
|
button_border_color = "#5c5c5c",
|
|
448
580
|
button_border_radius = 0,
|
|
@@ -460,8 +592,7 @@ def create_information_message_box(
|
|
|
460
592
|
message_box = QDialog()
|
|
461
593
|
message_box.setObjectName("message_box")
|
|
462
594
|
message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
463
|
-
message_box.
|
|
464
|
-
message_box.setMaximumWidth(480)
|
|
595
|
+
message_box.setFixedWidth(360)
|
|
465
596
|
style_sheet = f"""
|
|
466
597
|
QDialog#message_box {{
|
|
467
598
|
background-color: {background_color};
|
|
@@ -481,12 +612,17 @@ def create_information_message_box(
|
|
|
481
612
|
font_color= label_font_color,
|
|
482
613
|
background_color = "transparent",
|
|
483
614
|
padding = label_padding,
|
|
615
|
+
padding_left = label_padding_left,
|
|
616
|
+
padding_top = label_padding_top,
|
|
617
|
+
padding_right = label_padding_right,
|
|
618
|
+
padding_bottom = label_padding_bottom,
|
|
484
619
|
border_width = label_border_width,
|
|
485
620
|
border_color = label_border_color,
|
|
486
621
|
border_radius = label_border_radius
|
|
487
622
|
)
|
|
488
623
|
main_layout.addWidget(text_label)
|
|
489
|
-
|
|
624
|
+
text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
625
|
+
text_label.setWordWrap(True)
|
|
490
626
|
accept_button = create_button(
|
|
491
627
|
text = button_text,
|
|
492
628
|
font_family = button_font_family,
|
|
@@ -494,6 +630,10 @@ def create_information_message_box(
|
|
|
494
630
|
font_color = button_font_color,
|
|
495
631
|
background_color = button_background_color,
|
|
496
632
|
padding = button_padding,
|
|
633
|
+
padding_left = button_padding_left,
|
|
634
|
+
padding_top = button_padding_top,
|
|
635
|
+
padding_right = button_padding_right,
|
|
636
|
+
padding_bottom = button_padding_bottom,
|
|
497
637
|
border_width = button_border_width,
|
|
498
638
|
border_color = button_border_color,
|
|
499
639
|
border_radius = button_border_radius,
|
|
@@ -514,10 +654,10 @@ def create_information_message_box(
|
|
|
514
654
|
|
|
515
655
|
def create_confirmation_message_box(
|
|
516
656
|
text,
|
|
517
|
-
top_margin = 25,
|
|
518
|
-
bottom_margin = 25,
|
|
519
657
|
left_margin = 25,
|
|
658
|
+
top_margin = 25,
|
|
520
659
|
right_margin = 25,
|
|
660
|
+
bottom_margin = 25,
|
|
521
661
|
main_spacing = 10,
|
|
522
662
|
button_spacing = 10,
|
|
523
663
|
background_color = "#1e1e1e",
|
|
@@ -528,6 +668,10 @@ def create_confirmation_message_box(
|
|
|
528
668
|
label_font_size = 14,
|
|
529
669
|
label_font_color = "#ffffff",
|
|
530
670
|
label_padding = 15,
|
|
671
|
+
label_padding_left = None,
|
|
672
|
+
label_padding_top = None,
|
|
673
|
+
label_padding_right = None,
|
|
674
|
+
label_padding_bottom = None,
|
|
531
675
|
label_border_width = 0,
|
|
532
676
|
label_border_color = "#ffffff",
|
|
533
677
|
label_border_radius = 0,
|
|
@@ -536,6 +680,10 @@ def create_confirmation_message_box(
|
|
|
536
680
|
button_font_color = "#ffffff",
|
|
537
681
|
button_background_color = "#1e1e1e",
|
|
538
682
|
button_padding = 15,
|
|
683
|
+
button_padding_left = None,
|
|
684
|
+
button_padding_top = None,
|
|
685
|
+
button_padding_right = None,
|
|
686
|
+
button_padding_bottom = None,
|
|
539
687
|
button_border_width = 2,
|
|
540
688
|
button_border_color = "#5c5c5c",
|
|
541
689
|
button_border_radius = 0,
|
|
@@ -553,8 +701,7 @@ def create_confirmation_message_box(
|
|
|
553
701
|
confirm_message_box = QDialog()
|
|
554
702
|
confirm_message_box.setObjectName("confirm_message_box")
|
|
555
703
|
confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
556
|
-
confirm_message_box.
|
|
557
|
-
confirm_message_box.setMaximumWidth(480)
|
|
704
|
+
confirm_message_box.setFixedWidth(360)
|
|
558
705
|
style_sheet = f"""
|
|
559
706
|
QDialog#confirm_message_box {{
|
|
560
707
|
background-color: {background_color};
|
|
@@ -567,8 +714,6 @@ def create_confirmation_message_box(
|
|
|
567
714
|
confirm_message_box.setLayout(main_layout)
|
|
568
715
|
main_layout.setContentsMargins(left_margin, top_margin, right_margin, bottom_margin)
|
|
569
716
|
main_layout.setSpacing(main_spacing)
|
|
570
|
-
text_layout = QHBoxLayout()
|
|
571
|
-
main_layout.addLayout(text_layout)
|
|
572
717
|
text_label = create_label(
|
|
573
718
|
text = text,
|
|
574
719
|
font_family = label_font_family,
|
|
@@ -576,11 +721,17 @@ def create_confirmation_message_box(
|
|
|
576
721
|
font_color = label_font_color,
|
|
577
722
|
background_color = "transparent",
|
|
578
723
|
padding = label_padding,
|
|
724
|
+
padding_left = label_padding_left,
|
|
725
|
+
padding_top = label_padding_top,
|
|
726
|
+
padding_right = label_padding_right,
|
|
727
|
+
padding_bottom = label_padding_bottom,
|
|
579
728
|
border_width = label_border_width,
|
|
580
729
|
border_color = label_border_color,
|
|
581
730
|
border_radius = label_border_radius
|
|
582
731
|
)
|
|
583
|
-
|
|
732
|
+
main_layout.addWidget(text_label)
|
|
733
|
+
text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
734
|
+
text_label.setWordWrap(True)
|
|
584
735
|
buttons_layout = QHBoxLayout()
|
|
585
736
|
main_layout.addLayout(buttons_layout)
|
|
586
737
|
buttons_layout.setSpacing(button_spacing)
|
|
@@ -591,6 +742,10 @@ def create_confirmation_message_box(
|
|
|
591
742
|
font_color = button_font_color,
|
|
592
743
|
background_color = button_background_color,
|
|
593
744
|
padding = button_padding,
|
|
745
|
+
padding_left = button_padding_left,
|
|
746
|
+
padding_top = button_padding_top,
|
|
747
|
+
padding_right = button_padding_right,
|
|
748
|
+
padding_bottom = button_padding_bottom,
|
|
594
749
|
border_width = button_border_width,
|
|
595
750
|
border_color = button_border_color,
|
|
596
751
|
border_radius = button_border_radius,
|
|
@@ -614,6 +769,10 @@ def create_confirmation_message_box(
|
|
|
614
769
|
font_color = button_font_color,
|
|
615
770
|
background_color = button_background_color,
|
|
616
771
|
padding = button_padding,
|
|
772
|
+
padding_left = button_padding_left,
|
|
773
|
+
padding_top = button_padding_top,
|
|
774
|
+
padding_right = button_padding_right,
|
|
775
|
+
padding_bottom = button_padding_bottom,
|
|
617
776
|
border_width = button_border_width,
|
|
618
777
|
border_color = button_border_color,
|
|
619
778
|
border_radius = button_border_radius,
|
|
@@ -652,7 +811,7 @@ def create_list_table(
|
|
|
652
811
|
header_font_weight = "bold",
|
|
653
812
|
header_background_color = "#1e1e1e",
|
|
654
813
|
header_border_width = 1,
|
|
655
|
-
header_border_color = "#
|
|
814
|
+
header_border_color = "#191919",
|
|
656
815
|
hover_header_background_color = "#333333",
|
|
657
816
|
hover_header_border_width = 3,
|
|
658
817
|
hover_header_border_color = "#777777",
|
|
@@ -758,6 +917,10 @@ def confirm_exit(
|
|
|
758
917
|
label_font_size = 14,
|
|
759
918
|
label_font_color = "#ffffff",
|
|
760
919
|
label_padding = 15,
|
|
920
|
+
label_padding_top = None,
|
|
921
|
+
label_padding_right = None,
|
|
922
|
+
label_padding_bottom = None,
|
|
923
|
+
label_padding_left = None,
|
|
761
924
|
label_border_width = 0,
|
|
762
925
|
label_border_color = "#ffffff",
|
|
763
926
|
label_border_radius = 0,
|
|
@@ -766,6 +929,10 @@ def confirm_exit(
|
|
|
766
929
|
button_font_color = "#ffffff",
|
|
767
930
|
button_background_color = "#1e1e1e",
|
|
768
931
|
button_padding = 15,
|
|
932
|
+
button_padding_top = None,
|
|
933
|
+
button_padding_right = None,
|
|
934
|
+
button_padding_bottom = None,
|
|
935
|
+
button_padding_left = None,
|
|
769
936
|
button_border_width = 2,
|
|
770
937
|
button_border_color = "#5c5c5c",
|
|
771
938
|
button_border_radius = 0,
|
|
@@ -790,6 +957,10 @@ def confirm_exit(
|
|
|
790
957
|
label_font_size = label_font_size,
|
|
791
958
|
label_font_color = label_font_color,
|
|
792
959
|
label_padding = label_padding,
|
|
960
|
+
label_padding_top = label_padding_top,
|
|
961
|
+
label_padding_right = label_padding_right,
|
|
962
|
+
label_padding_bottom = label_padding_bottom,
|
|
963
|
+
label_padding_left = label_padding_left,
|
|
793
964
|
label_border_width = label_border_width,
|
|
794
965
|
label_border_color = label_border_color,
|
|
795
966
|
label_border_radius = label_border_radius,
|
|
@@ -798,6 +969,10 @@ def confirm_exit(
|
|
|
798
969
|
button_font_color = button_font_color,
|
|
799
970
|
button_background_color = button_background_color,
|
|
800
971
|
button_padding = button_padding,
|
|
972
|
+
button_padding_top = button_padding_top,
|
|
973
|
+
button_padding_right = button_padding_right,
|
|
974
|
+
button_padding_bottom = button_padding_bottom,
|
|
975
|
+
button_padding_left = button_padding_left,
|
|
801
976
|
button_border_width = button_border_width,
|
|
802
977
|
button_border_color = button_border_color,
|
|
803
978
|
button_border_radius = button_border_radius,
|
|
@@ -930,7 +1105,13 @@ def format_id(id_string):
|
|
|
930
1105
|
elif len(clean_id) == 7: return f"{clean_id[0:1]}.{clean_id[1:4]}.{clean_id[4:7]}"
|
|
931
1106
|
return id_string
|
|
932
1107
|
|
|
933
|
-
def
|
|
1108
|
+
def format_cellphone_number(cellphone_number):
|
|
934
1109
|
clean_number = "".join(filter(str.isdigit, cellphone_number))
|
|
935
1110
|
if len(clean_number) == 10: return f"{clean_number[0:4]} - {clean_number[4:10]}"
|
|
936
|
-
return cellphone_number
|
|
1111
|
+
return cellphone_number
|
|
1112
|
+
|
|
1113
|
+
def format_date(date):
|
|
1114
|
+
day = f"{date.day:02d}"
|
|
1115
|
+
month = f"{date.month:02d}"
|
|
1116
|
+
year = f"{date.year:,}".replace(",", ".")
|
|
1117
|
+
return f"{day}/{month}/{year}"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
gui_utilities/gui_utilities.py,sha256=
|
|
1
|
+
gui_utilities/gui_utilities.py,sha256=6lEpyp9VJw2xv5EUrDLxh4iM-A7haQzIfKfLhR2oqbw,43922
|
|
2
2
|
gui_utilities/icons/focused_hide_text_icon.png,sha256=0Ysx7vC-mEVfuSBWx1Zw-UhpqvrTCcIvnQ926wFmuK4,13084
|
|
3
3
|
gui_utilities/icons/focused_show_text_icon.png,sha256=gmZU7RR4FN-9VSzpD00ZkQ8UGbihO2y808Kh3b_TaEg,6739
|
|
4
4
|
gui_utilities/icons/hide_text_icon.png,sha256=f5jq6KaAygWNjzP_Ah6dw6eu8q5ml3m56JTeNSTSgEU,7207
|
|
5
5
|
gui_utilities/icons/show_text_icon.png,sha256=8Vdp2XickPEM-eTb1-qBXf3qmHldSzllMZZfObir9p8,5376
|
|
6
6
|
gui_utilities/tlds/tlds_list.txt,sha256=wIWmAQGVNsY0ZJy7qPW8kItDTCE4PTq8wcUhC2hpjkw,10916
|
|
7
|
-
gui_utilities-1.
|
|
8
|
-
gui_utilities-1.
|
|
9
|
-
gui_utilities-1.
|
|
10
|
-
gui_utilities-1.
|
|
11
|
-
gui_utilities-1.
|
|
7
|
+
gui_utilities-1.3.9.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
|
|
8
|
+
gui_utilities-1.3.9.dist-info/METADATA,sha256=6xPMk-MMJ7NRwjlT61zFIzO_sun9CxvN0fD4QdNEJB4,265
|
|
9
|
+
gui_utilities-1.3.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
gui_utilities-1.3.9.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
|
|
11
|
+
gui_utilities-1.3.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|