gui-utilities 1.2.9__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.2.9 → gui_utilities-1.3.13}/PKG-INFO +1 -1
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/gui_utilities.py +130 -60
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities.egg-info/PKG-INFO +1 -1
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/pyproject.toml +1 -1
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/LICENSE +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/README.md +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/icons/focused_hide_text_icon.png +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/icons/focused_show_text_icon.png +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/icons/hide_text_icon.png +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/icons/show_text_icon.png +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities/tlds/tlds_list.txt +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities.egg-info/SOURCES.txt +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities.egg-info/dependency_links.txt +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities.egg-info/requires.txt +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/gui_utilities.egg-info/top_level.txt +0 -0
- {gui_utilities-1.2.9 → gui_utilities-1.3.13}/setup.cfg +0 -0
|
@@ -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,10 +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,
|
|
30
31
|
title_padding_top = None,
|
|
31
32
|
title_padding_right = None,
|
|
32
33
|
title_padding_bottom = None,
|
|
33
|
-
title_padding_left = None,
|
|
34
34
|
title_border_width = 0,
|
|
35
35
|
title_border_color = "#ffffff",
|
|
36
36
|
title_border_radius = 0
|
|
@@ -44,10 +44,10 @@ def create_form(
|
|
|
44
44
|
font_color = title_font_color,
|
|
45
45
|
background_color = title_background_color,
|
|
46
46
|
padding = title_padding,
|
|
47
|
+
padding_left = title_padding_left,
|
|
47
48
|
padding_top = title_padding_top,
|
|
48
49
|
padding_right = title_padding_right,
|
|
49
50
|
padding_bottom = title_padding_bottom,
|
|
50
|
-
padding_left = title_padding_left,
|
|
51
51
|
border_width = title_border_width,
|
|
52
52
|
border_color = title_border_color,
|
|
53
53
|
border_radius = title_border_radius
|
|
@@ -85,6 +85,46 @@ def create_form(
|
|
|
85
85
|
body_layout.setStretch(1, 4)
|
|
86
86
|
return main_layout
|
|
87
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
|
+
|
|
88
128
|
def create_title(
|
|
89
129
|
text,
|
|
90
130
|
font_family = "Segoe UI",
|
|
@@ -92,10 +132,10 @@ def create_title(
|
|
|
92
132
|
font_color = "#ffffff",
|
|
93
133
|
background_color = "#1e1e1e",
|
|
94
134
|
padding = 15,
|
|
135
|
+
padding_left = None,
|
|
95
136
|
padding_top = None,
|
|
96
137
|
padding_right = None,
|
|
97
138
|
padding_bottom = None,
|
|
98
|
-
padding_left = None,
|
|
99
139
|
border_width = 0,
|
|
100
140
|
border_color = "#ffffff",
|
|
101
141
|
border_radius = 0
|
|
@@ -111,10 +151,10 @@ def create_title(
|
|
|
111
151
|
font_weight = "bold",
|
|
112
152
|
background_color = background_color,
|
|
113
153
|
padding = padding,
|
|
154
|
+
padding_left = padding_left,
|
|
114
155
|
padding_top = padding_top,
|
|
115
156
|
padding_right = padding_right,
|
|
116
157
|
padding_bottom = padding_bottom,
|
|
117
|
-
padding_left = padding_left,
|
|
118
158
|
border_width = border_width,
|
|
119
159
|
border_color = border_color,
|
|
120
160
|
border_radius = border_radius
|
|
@@ -130,31 +170,47 @@ def create_label(
|
|
|
130
170
|
font_weight = "normal",
|
|
131
171
|
background_color = "#1e1e1e",
|
|
132
172
|
padding = 15,
|
|
173
|
+
padding_left = None,
|
|
133
174
|
padding_top = None,
|
|
134
175
|
padding_right = None,
|
|
135
176
|
padding_bottom = None,
|
|
136
|
-
padding_left = None,
|
|
137
177
|
border_width = 0,
|
|
138
178
|
border_color = "#ffffff",
|
|
139
|
-
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"
|
|
140
184
|
):
|
|
141
185
|
label = QLabel(text)
|
|
186
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
142
187
|
padding_top_value = padding_top if padding_top is not None else padding
|
|
143
188
|
padding_right_value = padding_right if padding_right is not None else padding
|
|
144
189
|
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
145
|
-
padding_left_value = padding_left if padding_left is not None else padding
|
|
146
190
|
style = f"""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
+
}}
|
|
158
214
|
"""
|
|
159
215
|
label.setStyleSheet(style)
|
|
160
216
|
return label
|
|
@@ -167,10 +223,10 @@ def create_button(
|
|
|
167
223
|
font_weight = "bold",
|
|
168
224
|
background_color = "#1e1e1e",
|
|
169
225
|
padding = 15,
|
|
226
|
+
padding_left = None,
|
|
170
227
|
padding_top = None,
|
|
171
228
|
padding_right = None,
|
|
172
229
|
padding_bottom = None,
|
|
173
|
-
padding_left = None,
|
|
174
230
|
border_width = 2,
|
|
175
231
|
border_color = "#5c5c5c",
|
|
176
232
|
border_radius = 0,
|
|
@@ -185,11 +241,29 @@ def create_button(
|
|
|
185
241
|
disabled_border_width = 2,
|
|
186
242
|
disabled_border_color = "#4a4a4a"
|
|
187
243
|
):
|
|
188
|
-
button = QPushButton(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
244
|
+
button = QPushButton()
|
|
245
|
+
button.setMaximumWidth(360)
|
|
246
|
+
main_layout = QVBoxLayout(button)
|
|
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
|
+
)
|
|
264
|
+
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
265
|
+
label.setWordWrap(True)
|
|
266
|
+
main_layout.addWidget(label)
|
|
193
267
|
style_sheet = f"""
|
|
194
268
|
QPushButton {{
|
|
195
269
|
font-family: {font_family};
|
|
@@ -197,10 +271,7 @@ def create_button(
|
|
|
197
271
|
color: {font_color};
|
|
198
272
|
font-weight: {font_weight};
|
|
199
273
|
background-color: {background_color};
|
|
200
|
-
padding
|
|
201
|
-
padding-right: {padding_right_value}px;
|
|
202
|
-
padding-bottom: {padding_bottom_value}px;
|
|
203
|
-
padding-left: {padding_left_value}px;
|
|
274
|
+
padding: 0px;
|
|
204
275
|
border: {border_width}px solid {border_color};
|
|
205
276
|
border-radius: {border_radius}px;
|
|
206
277
|
}}
|
|
@@ -229,10 +300,10 @@ def create_text_box(
|
|
|
229
300
|
font_weight = "normal",
|
|
230
301
|
background_color = "#1e1e1e",
|
|
231
302
|
padding = 15,
|
|
303
|
+
padding_left = None,
|
|
232
304
|
padding_top = None,
|
|
233
305
|
padding_right = None,
|
|
234
306
|
padding_bottom = None,
|
|
235
|
-
padding_left = None,
|
|
236
307
|
border_width = 2,
|
|
237
308
|
border_color = "#5c5c5c",
|
|
238
309
|
border_radius = 0,
|
|
@@ -254,10 +325,10 @@ def create_text_box(
|
|
|
254
325
|
):
|
|
255
326
|
text_box = QLineEdit()
|
|
256
327
|
text_box.setPlaceholderText(placeholder_text)
|
|
328
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
257
329
|
padding_top_value = padding_top if padding_top is not None else padding
|
|
258
330
|
padding_right_value = padding_right if padding_right is not None else padding
|
|
259
331
|
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
260
|
-
padding_left_value = padding_left if padding_left is not None else padding
|
|
261
332
|
style_sheet = f"""
|
|
262
333
|
QLineEdit {{
|
|
263
334
|
font-family: {font_family};
|
|
@@ -265,10 +336,10 @@ def create_text_box(
|
|
|
265
336
|
color: {font_color};
|
|
266
337
|
font-weight: {font_weight};
|
|
267
338
|
background-color: {background_color};
|
|
339
|
+
padding-left: {padding_left_value}px;
|
|
268
340
|
padding-top: {padding_top_value}px;
|
|
269
341
|
padding-right: {padding_right_value}px;
|
|
270
342
|
padding-bottom: {padding_bottom_value}px;
|
|
271
|
-
padding-left: {padding_left_value}px;
|
|
272
343
|
border: {border_width}px solid {border_color};
|
|
273
344
|
border-radius: {border_radius}px;
|
|
274
345
|
}}
|
|
@@ -343,10 +414,10 @@ def create_combo_box(
|
|
|
343
414
|
font_color = "#ffffff",
|
|
344
415
|
background_color = "#1e1e1e",
|
|
345
416
|
padding = 15,
|
|
417
|
+
padding_left = None,
|
|
346
418
|
padding_top = None,
|
|
347
419
|
padding_right = None,
|
|
348
420
|
padding_bottom = None,
|
|
349
|
-
padding_left = None,
|
|
350
421
|
border_width = 2,
|
|
351
422
|
border_color = "#5c5c5c",
|
|
352
423
|
border_radius = 0,
|
|
@@ -368,10 +439,10 @@ def create_combo_box(
|
|
|
368
439
|
combo_box.addItems(items)
|
|
369
440
|
combo_box.setCurrentIndex(-1)
|
|
370
441
|
|
|
442
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
371
443
|
padding_top_value = padding_top if padding_top is not None else padding
|
|
372
444
|
padding_right_value = padding_right if padding_right is not None else padding
|
|
373
445
|
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
374
|
-
padding_left_value = padding_left if padding_left is not None else padding
|
|
375
446
|
|
|
376
447
|
def get_stylesheet(font_color):
|
|
377
448
|
return f"""
|
|
@@ -380,10 +451,10 @@ def create_combo_box(
|
|
|
380
451
|
font-size: {font_size}px;
|
|
381
452
|
color: {font_color};
|
|
382
453
|
background-color: {background_color};
|
|
454
|
+
padding-left: {padding_left_value}px;
|
|
383
455
|
padding-top: {padding_top_value}px;
|
|
384
456
|
padding-right: {padding_right_value}px;
|
|
385
457
|
padding-bottom: {padding_bottom_value}px;
|
|
386
|
-
padding-left: {padding_left_value}px;
|
|
387
458
|
border: {border_width}px solid {border_color};
|
|
388
459
|
border-radius: {border_radius}px;
|
|
389
460
|
}}
|
|
@@ -422,10 +493,10 @@ def create_checkbox(
|
|
|
422
493
|
font_color = "#ffffff",
|
|
423
494
|
background_color = "#1e1e1e",
|
|
424
495
|
padding = 5,
|
|
496
|
+
padding_left = None,
|
|
425
497
|
padding_top = None,
|
|
426
498
|
padding_right = None,
|
|
427
499
|
padding_bottom = None,
|
|
428
|
-
padding_left = None,
|
|
429
500
|
indicator_background_color = "#1e1e1e",
|
|
430
501
|
indicator_border_width = 1,
|
|
431
502
|
indicator_border_color = "#5c5c5c",
|
|
@@ -445,20 +516,20 @@ def create_checkbox(
|
|
|
445
516
|
disabled_border_color = "#4a4a4a"
|
|
446
517
|
):
|
|
447
518
|
check_box = QCheckBox(text)
|
|
519
|
+
padding_left_value = padding_left if padding_left is not None else padding
|
|
448
520
|
padding_top_value = padding_top if padding_top is not None else padding
|
|
449
521
|
padding_right_value = padding_right if padding_right is not None else padding
|
|
450
522
|
padding_bottom_value = padding_bottom if padding_bottom is not None else padding
|
|
451
|
-
padding_left_value = padding_left if padding_left is not None else padding
|
|
452
523
|
style_sheet = f"""
|
|
453
524
|
QCheckBox {{
|
|
454
525
|
font-family: {font_family};
|
|
455
526
|
font-size: {font_size}px;
|
|
456
527
|
color: {font_color};
|
|
457
528
|
background-color: {background_color};
|
|
529
|
+
padding-left: {padding_left_value}px;
|
|
458
530
|
padding-top: {padding_top_value}px;
|
|
459
531
|
padding-right: {padding_right_value}px;
|
|
460
532
|
padding-bottom: {padding_bottom_value}px;
|
|
461
|
-
padding-left: {padding_left_value}px;
|
|
462
533
|
}}
|
|
463
534
|
QCheckBox::indicator {{
|
|
464
535
|
image: none;
|
|
@@ -487,16 +558,16 @@ def create_checkbox(
|
|
|
487
558
|
background-color: {disabled_background_color};
|
|
488
559
|
border: {disabled_border_width}px solid {disabled_border_color};
|
|
489
560
|
}}
|
|
490
|
-
"""
|
|
561
|
+
"""
|
|
491
562
|
check_box.setStyleSheet(style_sheet)
|
|
492
563
|
return check_box
|
|
493
564
|
|
|
494
565
|
def create_information_message_box(
|
|
495
566
|
text,
|
|
496
|
-
top_margin = 25,
|
|
497
|
-
bottom_margin = 25,
|
|
498
567
|
left_margin = 25,
|
|
568
|
+
top_margin = 25,
|
|
499
569
|
right_margin = 25,
|
|
570
|
+
bottom_margin = 25,
|
|
500
571
|
spacing = 10,
|
|
501
572
|
background_color = "#1e1e1e",
|
|
502
573
|
border_width = 2,
|
|
@@ -506,10 +577,10 @@ def create_information_message_box(
|
|
|
506
577
|
label_font_size = 14,
|
|
507
578
|
label_font_color = "#ffffff",
|
|
508
579
|
label_padding = 15,
|
|
580
|
+
label_padding_left = None,
|
|
509
581
|
label_padding_top = None,
|
|
510
582
|
label_padding_right = None,
|
|
511
583
|
label_padding_bottom = None,
|
|
512
|
-
label_padding_left = None,
|
|
513
584
|
label_border_width = 0,
|
|
514
585
|
label_border_color = "#ffffff",
|
|
515
586
|
label_border_radius = 0,
|
|
@@ -519,10 +590,10 @@ def create_information_message_box(
|
|
|
519
590
|
button_font_color = "#ffffff",
|
|
520
591
|
button_background_color = "#1e1e1e",
|
|
521
592
|
button_padding = 15,
|
|
593
|
+
button_padding_left = None,
|
|
522
594
|
button_padding_top = None,
|
|
523
595
|
button_padding_right = None,
|
|
524
596
|
button_padding_bottom = None,
|
|
525
|
-
button_padding_left = None,
|
|
526
597
|
button_border_width = 2,
|
|
527
598
|
button_border_color = "#5c5c5c",
|
|
528
599
|
button_border_radius = 0,
|
|
@@ -540,8 +611,7 @@ def create_information_message_box(
|
|
|
540
611
|
message_box = QDialog()
|
|
541
612
|
message_box.setObjectName("message_box")
|
|
542
613
|
message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
543
|
-
message_box.
|
|
544
|
-
message_box.setMaximumWidth(480)
|
|
614
|
+
message_box.setFixedWidth(360)
|
|
545
615
|
style_sheet = f"""
|
|
546
616
|
QDialog#message_box {{
|
|
547
617
|
background-color: {background_color};
|
|
@@ -561,16 +631,17 @@ def create_information_message_box(
|
|
|
561
631
|
font_color= label_font_color,
|
|
562
632
|
background_color = "transparent",
|
|
563
633
|
padding = label_padding,
|
|
634
|
+
padding_left = label_padding_left,
|
|
564
635
|
padding_top = label_padding_top,
|
|
565
636
|
padding_right = label_padding_right,
|
|
566
637
|
padding_bottom = label_padding_bottom,
|
|
567
|
-
padding_left = label_padding_left,
|
|
568
638
|
border_width = label_border_width,
|
|
569
639
|
border_color = label_border_color,
|
|
570
640
|
border_radius = label_border_radius
|
|
571
641
|
)
|
|
572
642
|
main_layout.addWidget(text_label)
|
|
573
|
-
|
|
643
|
+
text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
644
|
+
text_label.setWordWrap(True)
|
|
574
645
|
accept_button = create_button(
|
|
575
646
|
text = button_text,
|
|
576
647
|
font_family = button_font_family,
|
|
@@ -578,10 +649,10 @@ def create_information_message_box(
|
|
|
578
649
|
font_color = button_font_color,
|
|
579
650
|
background_color = button_background_color,
|
|
580
651
|
padding = button_padding,
|
|
652
|
+
padding_left = button_padding_left,
|
|
581
653
|
padding_top = button_padding_top,
|
|
582
654
|
padding_right = button_padding_right,
|
|
583
655
|
padding_bottom = button_padding_bottom,
|
|
584
|
-
padding_left = button_padding_left,
|
|
585
656
|
border_width = button_border_width,
|
|
586
657
|
border_color = button_border_color,
|
|
587
658
|
border_radius = button_border_radius,
|
|
@@ -602,10 +673,10 @@ def create_information_message_box(
|
|
|
602
673
|
|
|
603
674
|
def create_confirmation_message_box(
|
|
604
675
|
text,
|
|
605
|
-
top_margin = 25,
|
|
606
|
-
bottom_margin = 25,
|
|
607
676
|
left_margin = 25,
|
|
677
|
+
top_margin = 25,
|
|
608
678
|
right_margin = 25,
|
|
679
|
+
bottom_margin = 25,
|
|
609
680
|
main_spacing = 10,
|
|
610
681
|
button_spacing = 10,
|
|
611
682
|
background_color = "#1e1e1e",
|
|
@@ -616,10 +687,10 @@ def create_confirmation_message_box(
|
|
|
616
687
|
label_font_size = 14,
|
|
617
688
|
label_font_color = "#ffffff",
|
|
618
689
|
label_padding = 15,
|
|
690
|
+
label_padding_left = None,
|
|
619
691
|
label_padding_top = None,
|
|
620
692
|
label_padding_right = None,
|
|
621
693
|
label_padding_bottom = None,
|
|
622
|
-
label_padding_left = None,
|
|
623
694
|
label_border_width = 0,
|
|
624
695
|
label_border_color = "#ffffff",
|
|
625
696
|
label_border_radius = 0,
|
|
@@ -628,10 +699,10 @@ def create_confirmation_message_box(
|
|
|
628
699
|
button_font_color = "#ffffff",
|
|
629
700
|
button_background_color = "#1e1e1e",
|
|
630
701
|
button_padding = 15,
|
|
702
|
+
button_padding_left = None,
|
|
631
703
|
button_padding_top = None,
|
|
632
704
|
button_padding_right = None,
|
|
633
705
|
button_padding_bottom = None,
|
|
634
|
-
button_padding_left = None,
|
|
635
706
|
button_border_width = 2,
|
|
636
707
|
button_border_color = "#5c5c5c",
|
|
637
708
|
button_border_radius = 0,
|
|
@@ -649,8 +720,7 @@ def create_confirmation_message_box(
|
|
|
649
720
|
confirm_message_box = QDialog()
|
|
650
721
|
confirm_message_box.setObjectName("confirm_message_box")
|
|
651
722
|
confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
652
|
-
confirm_message_box.
|
|
653
|
-
confirm_message_box.setMaximumWidth(480)
|
|
723
|
+
confirm_message_box.setFixedWidth(360)
|
|
654
724
|
style_sheet = f"""
|
|
655
725
|
QDialog#confirm_message_box {{
|
|
656
726
|
background-color: {background_color};
|
|
@@ -663,8 +733,6 @@ def create_confirmation_message_box(
|
|
|
663
733
|
confirm_message_box.setLayout(main_layout)
|
|
664
734
|
main_layout.setContentsMargins(left_margin, top_margin, right_margin, bottom_margin)
|
|
665
735
|
main_layout.setSpacing(main_spacing)
|
|
666
|
-
text_layout = QHBoxLayout()
|
|
667
|
-
main_layout.addLayout(text_layout)
|
|
668
736
|
text_label = create_label(
|
|
669
737
|
text = text,
|
|
670
738
|
font_family = label_font_family,
|
|
@@ -672,15 +740,17 @@ def create_confirmation_message_box(
|
|
|
672
740
|
font_color = label_font_color,
|
|
673
741
|
background_color = "transparent",
|
|
674
742
|
padding = label_padding,
|
|
743
|
+
padding_left = label_padding_left,
|
|
675
744
|
padding_top = label_padding_top,
|
|
676
745
|
padding_right = label_padding_right,
|
|
677
746
|
padding_bottom = label_padding_bottom,
|
|
678
|
-
padding_left = label_padding_left,
|
|
679
747
|
border_width = label_border_width,
|
|
680
748
|
border_color = label_border_color,
|
|
681
749
|
border_radius = label_border_radius
|
|
682
750
|
)
|
|
683
|
-
|
|
751
|
+
main_layout.addWidget(text_label)
|
|
752
|
+
text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
753
|
+
text_label.setWordWrap(True)
|
|
684
754
|
buttons_layout = QHBoxLayout()
|
|
685
755
|
main_layout.addLayout(buttons_layout)
|
|
686
756
|
buttons_layout.setSpacing(button_spacing)
|
|
@@ -691,10 +761,10 @@ def create_confirmation_message_box(
|
|
|
691
761
|
font_color = button_font_color,
|
|
692
762
|
background_color = button_background_color,
|
|
693
763
|
padding = button_padding,
|
|
764
|
+
padding_left = button_padding_left,
|
|
694
765
|
padding_top = button_padding_top,
|
|
695
766
|
padding_right = button_padding_right,
|
|
696
767
|
padding_bottom = button_padding_bottom,
|
|
697
|
-
padding_left = button_padding_left,
|
|
698
768
|
border_width = button_border_width,
|
|
699
769
|
border_color = button_border_color,
|
|
700
770
|
border_radius = button_border_radius,
|
|
@@ -718,10 +788,10 @@ def create_confirmation_message_box(
|
|
|
718
788
|
font_color = button_font_color,
|
|
719
789
|
background_color = button_background_color,
|
|
720
790
|
padding = button_padding,
|
|
791
|
+
padding_left = button_padding_left,
|
|
721
792
|
padding_top = button_padding_top,
|
|
722
793
|
padding_right = button_padding_right,
|
|
723
794
|
padding_bottom = button_padding_bottom,
|
|
724
|
-
padding_left = button_padding_left,
|
|
725
795
|
border_width = button_border_width,
|
|
726
796
|
border_color = button_border_color,
|
|
727
797
|
border_radius = button_border_radius,
|
|
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
|