gui-utilities 1.2.6__py3-none-any.whl → 1.3.36__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.

@@ -18,7 +18,7 @@ def create_window(title, background_color = "#1e1e1e"):
18
18
  window.setLayout(main_layout)
19
19
  return window
20
20
 
21
- def create_form(
21
+ def create_menu(
22
22
  ui_instance,
23
23
  buttons,
24
24
  title,
@@ -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,13 +85,57 @@ 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",
83
131
  font_size = 36,
84
132
  font_color = "#ffffff",
85
- background_color = "#1e1e1e",
133
+ background_color = "transparent",
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
@@ -112,22 +168,52 @@ def create_label(
112
168
  font_size = 14,
113
169
  font_color = "#ffffff",
114
170
  font_weight = "normal",
115
- background_color = "#1e1e1e",
171
+ background_color = "transparent",
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
- border_color = "#ffffff",
119
- border_radius = 0
178
+ border_color = "#5c5c5c",
179
+ border_radius = 0,
180
+ hover_background_color = "transparent",
181
+ hover_border_width = 0,
182
+ hover_border_color = "#777777",
183
+ disabled_font_color = "#888888",
184
+ disabled_background_color = "transparent",
185
+ disabled_border_width = 0,
186
+ disabled_border_color = "#4a4a4a",
187
+ parent = None
120
188
  ):
121
- label = QLabel(text)
189
+ label = QLabel(text, parent)
190
+ padding_left_value = padding_left if padding_left is not None else padding
191
+ padding_top_value = padding_top if padding_top is not None else padding
192
+ padding_right_value = padding_right if padding_right is not None else padding
193
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
122
194
  style = f"""
123
- font-family: {font_family};
124
- font-size: {font_size}px;
125
- color: {font_color};
126
- font-weight: {font_weight};
127
- background-color: {background_color};
128
- padding: {padding}px;
129
- border: {border_width}px solid {border_color};
130
- border-radius: {border_radius}px;
195
+ QLabel {{
196
+ font-family: {font_family};
197
+ font-size: {font_size}px;
198
+ color: {font_color};
199
+ font-weight: {font_weight};
200
+ background-color: {background_color};
201
+ padding-left: {padding_left_value}px;
202
+ padding-top: {padding_top_value}px;
203
+ padding-right: {padding_right_value}px;
204
+ padding-bottom: {padding_bottom_value}px;
205
+ border: {border_width}px solid {border_color};
206
+ border-radius: {border_radius}px;
207
+ }}
208
+ QLabel:hover{{
209
+ background-color: {hover_background_color};
210
+ border: {hover_border_width}px solid {hover_border_color};
211
+ }}
212
+ QLabel:disabled{{
213
+ color: {disabled_font_color};
214
+ background-color: {disabled_background_color};
215
+ border: {disabled_border_width}px solid {disabled_border_color};
216
+ }}
131
217
  """
132
218
  label.setStyleSheet(style)
133
219
  return label
@@ -140,6 +226,10 @@ def create_button(
140
226
  font_weight = "bold",
141
227
  background_color = "#1e1e1e",
142
228
  padding = 15,
229
+ padding_left = None,
230
+ padding_top = None,
231
+ padding_right = None,
232
+ padding_bottom = None,
143
233
  border_width = 2,
144
234
  border_color = "#5c5c5c",
145
235
  border_radius = 0,
@@ -152,9 +242,34 @@ def create_button(
152
242
  disabled_font_color = "#888888",
153
243
  disabled_background_color = "#2d2d2d",
154
244
  disabled_border_width = 2,
155
- disabled_border_color = "#4a4a4a"
245
+ disabled_border_color = "#4a4a4a",
246
+ maximum_width = 360
156
247
  ):
157
- button = QPushButton(text)
248
+ button = QPushButton()
249
+ button.setMaximumWidth(maximum_width)
250
+ main_layout = QVBoxLayout()
251
+ button.setLayout(main_layout)
252
+ main_layout.setContentsMargins(0, 0, 0, 0)
253
+ label = create_label(
254
+ text = text,
255
+ font_size = font_size,
256
+ font_color = font_color,
257
+ font_weight = "bold",
258
+ padding = padding,
259
+ padding_left = padding_left,
260
+ padding_top = padding_top,
261
+ padding_right = padding_right,
262
+ padding_bottom = padding_bottom,
263
+ disabled_border_width = disabled_border_width
264
+ )
265
+ label.setAlignment(Qt.AlignmentFlag.AlignCenter)
266
+ label.setWordWrap(True)
267
+ main_layout.addWidget(label)
268
+ button.setFixedHeight(main_layout.sizeHint().height() + 2 * border_width)
269
+ padding_left_value = padding_left if padding_left is not None else padding
270
+ padding_top_value = padding_top if padding_top is not None else padding
271
+ padding_right_value = padding_right if padding_right is not None else padding
272
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
158
273
  style_sheet = f"""
159
274
  QPushButton {{
160
275
  font-family: {font_family};
@@ -162,7 +277,10 @@ def create_button(
162
277
  color: {font_color};
163
278
  font-weight: {font_weight};
164
279
  background-color: {background_color};
165
- padding: {padding}px;
280
+ padding-left: {padding_left_value}px;
281
+ padding-top: {padding_top_value}px;
282
+ padding-right: {padding_right_value}px;
283
+ padding-bottom: {padding_bottom_value}px;
166
284
  border: {border_width}px solid {border_color};
167
285
  border-radius: {border_radius}px;
168
286
  }}
@@ -191,9 +309,14 @@ def create_text_box(
191
309
  font_weight = "normal",
192
310
  background_color = "#1e1e1e",
193
311
  padding = 15,
312
+ padding_left = None,
313
+ padding_top = None,
314
+ padding_right = None,
315
+ padding_bottom = None,
194
316
  border_width = 2,
195
317
  border_color = "#5c5c5c",
196
318
  border_radius = 0,
319
+ placeholder_font_color = "#888888",
197
320
  hover_background_color = "#333333",
198
321
  hover_border_width = 3,
199
322
  hover_border_color = "#777777",
@@ -208,10 +331,14 @@ def create_text_box(
208
331
  hide_text_icon_url = str(icons_dir / "hide_text_icon.png"),
209
332
  focused_show_text_icon_url = str(icons_dir / "focused_show_text_icon.png"),
210
333
  focused_hide_text_icon_url = str(icons_dir / "focused_hide_text_icon.png"),
211
- hide_text = False
334
+ hide_text = False,
335
+ math_expression = False
212
336
  ):
213
337
  text_box = QLineEdit()
214
- text_box.setPlaceholderText(placeholder_text)
338
+ padding_left_value = padding_left if padding_left is not None else padding
339
+ padding_top_value = padding_top if padding_top is not None else padding
340
+ padding_right_value = padding_right if padding_right is not None else padding
341
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
215
342
  style_sheet = f"""
216
343
  QLineEdit {{
217
344
  font-family: {font_family};
@@ -219,7 +346,10 @@ def create_text_box(
219
346
  color: {font_color};
220
347
  font-weight: {font_weight};
221
348
  background-color: {background_color};
222
- padding: {padding}px;
349
+ padding-left: {padding_left_value}px;
350
+ padding-top: {padding_top_value}px;
351
+ padding-right: {padding_right_value}px;
352
+ padding-bottom: {padding_bottom_value}px;
223
353
  border: {border_width}px solid {border_color};
224
354
  border-radius: {border_radius}px;
225
355
  }}
@@ -238,6 +368,36 @@ def create_text_box(
238
368
  }}
239
369
  """
240
370
  text_box.setStyleSheet(style_sheet)
371
+
372
+ def latex_to_html(expression):
373
+ html_expression = expression
374
+ html_expression = re.sub(r"\\frac\{(.*?)\}\{(.*?)\}", r"<span style='font-size:90%;'>\1⁄\2</span>", html_expression)
375
+ html_expression = re.sub(r"([a-zA-Z])_(\d+)", r"\1<sub>\2</sub>", html_expression)
376
+ html_expression = re.sub(r"([a-zA-Z0-9])\^(\d+)", r"\1<sup>\2</sup>", html_expression)
377
+ html_expression = html_expression.replace(" ", "&nbsp;")
378
+ return html_expression
379
+
380
+ if not math_expression: text_box.setPlaceholderText(placeholder_text)
381
+ else:
382
+ html_placeholder = latex_to_html(placeholder_text)
383
+ placeholder_label = create_label(
384
+ text = html_placeholder,
385
+ font_color = placeholder_font_color,
386
+ font_family = font_family,
387
+ font_size = font_size,
388
+ background_color = "transparent",
389
+ hover_background_color = "transparent",
390
+ disabled_background_color = "transparent",
391
+ parent = text_box
392
+ )
393
+ placeholder_label.setTextFormat(Qt.TextFormat.RichText)
394
+ placeholder_label.show()
395
+
396
+ def update_placeholder_visibility():
397
+ placeholder_label.setVisible(text_box.text() == "")
398
+
399
+ text_box.textChanged.connect(update_placeholder_visibility)
400
+ update_placeholder_visibility()
241
401
  if hide_text:
242
402
  show_text_icon = QIcon(show_text_icon_url)
243
403
  hide_text_icon = QIcon(hide_text_icon_url)
@@ -279,7 +439,7 @@ def create_text_box(
279
439
  if event.type() in (QEvent.Type.FocusIn, QEvent.Type.FocusOut): update_icon()
280
440
  return super().eventFilter(watched, event)
281
441
 
282
- focus_watcher = FocusWatcher(text_box)
442
+ focus_watcher = FocusWatcher(text_box, on_focus_change = update_icon)
283
443
  text_box.installEventFilter(focus_watcher)
284
444
  setattr(text_box, "focus_watcher", focus_watcher)
285
445
  update_icon()
@@ -294,6 +454,10 @@ def create_combo_box(
294
454
  font_color = "#ffffff",
295
455
  background_color = "#1e1e1e",
296
456
  padding = 15,
457
+ padding_left = None,
458
+ padding_top = None,
459
+ padding_right = None,
460
+ padding_bottom = None,
297
461
  border_width = 2,
298
462
  border_color = "#5c5c5c",
299
463
  border_radius = 0,
@@ -315,6 +479,11 @@ def create_combo_box(
315
479
  combo_box.addItems(items)
316
480
  combo_box.setCurrentIndex(-1)
317
481
 
482
+ padding_left_value = padding_left if padding_left is not None else padding
483
+ padding_top_value = padding_top if padding_top is not None else padding
484
+ padding_right_value = padding_right if padding_right is not None else padding
485
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
486
+
318
487
  def get_stylesheet(font_color):
319
488
  return f"""
320
489
  QComboBox {{
@@ -322,7 +491,10 @@ def create_combo_box(
322
491
  font-size: {font_size}px;
323
492
  color: {font_color};
324
493
  background-color: {background_color};
325
- padding: {padding}px;
494
+ padding-left: {padding_left_value}px;
495
+ padding-top: {padding_top_value}px;
496
+ padding-right: {padding_right_value}px;
497
+ padding-bottom: {padding_bottom_value}px;
326
498
  border: {border_width}px solid {border_color};
327
499
  border-radius: {border_radius}px;
328
500
  }}
@@ -361,6 +533,10 @@ def create_checkbox(
361
533
  font_color = "#ffffff",
362
534
  background_color = "#1e1e1e",
363
535
  padding = 5,
536
+ padding_left = None,
537
+ padding_top = None,
538
+ padding_right = None,
539
+ padding_bottom = None,
364
540
  indicator_background_color = "#1e1e1e",
365
541
  indicator_border_width = 1,
366
542
  indicator_border_color = "#5c5c5c",
@@ -380,13 +556,20 @@ def create_checkbox(
380
556
  disabled_border_color = "#4a4a4a"
381
557
  ):
382
558
  check_box = QCheckBox(text)
559
+ padding_left_value = padding_left if padding_left is not None else padding
560
+ padding_top_value = padding_top if padding_top is not None else padding
561
+ padding_right_value = padding_right if padding_right is not None else padding
562
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
383
563
  style_sheet = f"""
384
564
  QCheckBox {{
385
565
  font-family: {font_family};
386
566
  font-size: {font_size}px;
387
567
  color: {font_color};
388
568
  background-color: {background_color};
389
- padding: {padding}px;
569
+ padding-left: {padding_left_value}px;
570
+ padding-top: {padding_top_value}px;
571
+ padding-right: {padding_right_value}px;
572
+ padding-bottom: {padding_bottom_value}px;
390
573
  }}
391
574
  QCheckBox::indicator {{
392
575
  image: none;
@@ -415,16 +598,16 @@ def create_checkbox(
415
598
  background-color: {disabled_background_color};
416
599
  border: {disabled_border_width}px solid {disabled_border_color};
417
600
  }}
418
- """
601
+ """
419
602
  check_box.setStyleSheet(style_sheet)
420
603
  return check_box
421
604
 
422
605
  def create_information_message_box(
423
606
  text,
424
- top_margin = 25,
425
- bottom_margin = 25,
426
607
  left_margin = 25,
608
+ top_margin = 25,
427
609
  right_margin = 25,
610
+ bottom_margin = 25,
428
611
  spacing = 10,
429
612
  background_color = "#1e1e1e",
430
613
  border_width = 2,
@@ -434,6 +617,10 @@ def create_information_message_box(
434
617
  label_font_size = 14,
435
618
  label_font_color = "#ffffff",
436
619
  label_padding = 15,
620
+ label_padding_left = None,
621
+ label_padding_top = None,
622
+ label_padding_right = None,
623
+ label_padding_bottom = None,
437
624
  label_border_width = 0,
438
625
  label_border_color = "#ffffff",
439
626
  label_border_radius = 0,
@@ -443,6 +630,10 @@ def create_information_message_box(
443
630
  button_font_color = "#ffffff",
444
631
  button_background_color = "#1e1e1e",
445
632
  button_padding = 15,
633
+ button_padding_left = None,
634
+ button_padding_top = None,
635
+ button_padding_right = None,
636
+ button_padding_bottom = None,
446
637
  button_border_width = 2,
447
638
  button_border_color = "#5c5c5c",
448
639
  button_border_radius = 0,
@@ -460,8 +651,7 @@ def create_information_message_box(
460
651
  message_box = QDialog()
461
652
  message_box.setObjectName("message_box")
462
653
  message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
463
- message_box.setMinimumWidth(240)
464
- message_box.setMaximumWidth(480)
654
+ message_box.setFixedWidth(360)
465
655
  style_sheet = f"""
466
656
  QDialog#message_box {{
467
657
  background-color: {background_color};
@@ -481,12 +671,17 @@ def create_information_message_box(
481
671
  font_color= label_font_color,
482
672
  background_color = "transparent",
483
673
  padding = label_padding,
674
+ padding_left = label_padding_left,
675
+ padding_top = label_padding_top,
676
+ padding_right = label_padding_right,
677
+ padding_bottom = label_padding_bottom,
484
678
  border_width = label_border_width,
485
679
  border_color = label_border_color,
486
680
  border_radius = label_border_radius
487
681
  )
488
682
  main_layout.addWidget(text_label)
489
-
683
+ text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
684
+ text_label.setWordWrap(True)
490
685
  accept_button = create_button(
491
686
  text = button_text,
492
687
  font_family = button_font_family,
@@ -494,6 +689,10 @@ def create_information_message_box(
494
689
  font_color = button_font_color,
495
690
  background_color = button_background_color,
496
691
  padding = button_padding,
692
+ padding_left = button_padding_left,
693
+ padding_top = button_padding_top,
694
+ padding_right = button_padding_right,
695
+ padding_bottom = button_padding_bottom,
497
696
  border_width = button_border_width,
498
697
  border_color = button_border_color,
499
698
  border_radius = button_border_radius,
@@ -514,10 +713,10 @@ def create_information_message_box(
514
713
 
515
714
  def create_confirmation_message_box(
516
715
  text,
517
- top_margin = 25,
518
- bottom_margin = 25,
519
716
  left_margin = 25,
717
+ top_margin = 25,
520
718
  right_margin = 25,
719
+ bottom_margin = 25,
521
720
  main_spacing = 10,
522
721
  button_spacing = 10,
523
722
  background_color = "#1e1e1e",
@@ -528,6 +727,10 @@ def create_confirmation_message_box(
528
727
  label_font_size = 14,
529
728
  label_font_color = "#ffffff",
530
729
  label_padding = 15,
730
+ label_padding_left = None,
731
+ label_padding_top = None,
732
+ label_padding_right = None,
733
+ label_padding_bottom = None,
531
734
  label_border_width = 0,
532
735
  label_border_color = "#ffffff",
533
736
  label_border_radius = 0,
@@ -536,6 +739,10 @@ def create_confirmation_message_box(
536
739
  button_font_color = "#ffffff",
537
740
  button_background_color = "#1e1e1e",
538
741
  button_padding = 15,
742
+ button_padding_left = None,
743
+ button_padding_top = None,
744
+ button_padding_right = None,
745
+ button_padding_bottom = None,
539
746
  button_border_width = 2,
540
747
  button_border_color = "#5c5c5c",
541
748
  button_border_radius = 0,
@@ -553,8 +760,7 @@ def create_confirmation_message_box(
553
760
  confirm_message_box = QDialog()
554
761
  confirm_message_box.setObjectName("confirm_message_box")
555
762
  confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
556
- confirm_message_box.setMinimumWidth(240)
557
- confirm_message_box.setMaximumWidth(480)
763
+ confirm_message_box.setFixedWidth(360)
558
764
  style_sheet = f"""
559
765
  QDialog#confirm_message_box {{
560
766
  background-color: {background_color};
@@ -567,8 +773,6 @@ def create_confirmation_message_box(
567
773
  confirm_message_box.setLayout(main_layout)
568
774
  main_layout.setContentsMargins(left_margin, top_margin, right_margin, bottom_margin)
569
775
  main_layout.setSpacing(main_spacing)
570
- text_layout = QHBoxLayout()
571
- main_layout.addLayout(text_layout)
572
776
  text_label = create_label(
573
777
  text = text,
574
778
  font_family = label_font_family,
@@ -576,11 +780,17 @@ def create_confirmation_message_box(
576
780
  font_color = label_font_color,
577
781
  background_color = "transparent",
578
782
  padding = label_padding,
783
+ padding_left = label_padding_left,
784
+ padding_top = label_padding_top,
785
+ padding_right = label_padding_right,
786
+ padding_bottom = label_padding_bottom,
579
787
  border_width = label_border_width,
580
788
  border_color = label_border_color,
581
789
  border_radius = label_border_radius
582
790
  )
583
- text_layout.addWidget(text_label)
791
+ main_layout.addWidget(text_label)
792
+ text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
793
+ text_label.setWordWrap(True)
584
794
  buttons_layout = QHBoxLayout()
585
795
  main_layout.addLayout(buttons_layout)
586
796
  buttons_layout.setSpacing(button_spacing)
@@ -591,6 +801,10 @@ def create_confirmation_message_box(
591
801
  font_color = button_font_color,
592
802
  background_color = button_background_color,
593
803
  padding = button_padding,
804
+ padding_left = button_padding_left,
805
+ padding_top = button_padding_top,
806
+ padding_right = button_padding_right,
807
+ padding_bottom = button_padding_bottom,
594
808
  border_width = button_border_width,
595
809
  border_color = button_border_color,
596
810
  border_radius = button_border_radius,
@@ -614,6 +828,10 @@ def create_confirmation_message_box(
614
828
  font_color = button_font_color,
615
829
  background_color = button_background_color,
616
830
  padding = button_padding,
831
+ padding_left = button_padding_left,
832
+ padding_top = button_padding_top,
833
+ padding_right = button_padding_right,
834
+ padding_bottom = button_padding_bottom,
617
835
  border_width = button_border_width,
618
836
  border_color = button_border_color,
619
837
  border_radius = button_border_radius,
@@ -652,7 +870,7 @@ def create_list_table(
652
870
  header_font_weight = "bold",
653
871
  header_background_color = "#1e1e1e",
654
872
  header_border_width = 1,
655
- header_border_color = "#000000",
873
+ header_border_color = "#191919",
656
874
  hover_header_background_color = "#333333",
657
875
  hover_header_border_width = 3,
658
876
  hover_header_border_color = "#777777",
@@ -758,6 +976,10 @@ def confirm_exit(
758
976
  label_font_size = 14,
759
977
  label_font_color = "#ffffff",
760
978
  label_padding = 15,
979
+ label_padding_top = None,
980
+ label_padding_right = None,
981
+ label_padding_bottom = None,
982
+ label_padding_left = None,
761
983
  label_border_width = 0,
762
984
  label_border_color = "#ffffff",
763
985
  label_border_radius = 0,
@@ -766,6 +988,10 @@ def confirm_exit(
766
988
  button_font_color = "#ffffff",
767
989
  button_background_color = "#1e1e1e",
768
990
  button_padding = 15,
991
+ button_padding_top = None,
992
+ button_padding_right = None,
993
+ button_padding_bottom = None,
994
+ button_padding_left = None,
769
995
  button_border_width = 2,
770
996
  button_border_color = "#5c5c5c",
771
997
  button_border_radius = 0,
@@ -790,6 +1016,10 @@ def confirm_exit(
790
1016
  label_font_size = label_font_size,
791
1017
  label_font_color = label_font_color,
792
1018
  label_padding = label_padding,
1019
+ label_padding_top = label_padding_top,
1020
+ label_padding_right = label_padding_right,
1021
+ label_padding_bottom = label_padding_bottom,
1022
+ label_padding_left = label_padding_left,
793
1023
  label_border_width = label_border_width,
794
1024
  label_border_color = label_border_color,
795
1025
  label_border_radius = label_border_radius,
@@ -798,6 +1028,10 @@ def confirm_exit(
798
1028
  button_font_color = button_font_color,
799
1029
  button_background_color = button_background_color,
800
1030
  button_padding = button_padding,
1031
+ button_padding_top = button_padding_top,
1032
+ button_padding_right = button_padding_right,
1033
+ button_padding_bottom = button_padding_bottom,
1034
+ button_padding_left = button_padding_left,
801
1035
  button_border_width = button_border_width,
802
1036
  button_border_color = button_border_color,
803
1037
  button_border_radius = button_border_radius,
@@ -930,7 +1164,13 @@ def format_id(id_string):
930
1164
  elif len(clean_id) == 7: return f"{clean_id[0:1]}.{clean_id[1:4]}.{clean_id[4:7]}"
931
1165
  return id_string
932
1166
 
933
- def cellphone_number_format(cellphone_number):
1167
+ def format_cellphone_number(cellphone_number):
934
1168
  clean_number = "".join(filter(str.isdigit, cellphone_number))
935
1169
  if len(clean_number) == 10: return f"{clean_number[0:4]} - {clean_number[4:10]}"
936
- return cellphone_number
1170
+ return cellphone_number
1171
+
1172
+ def format_date(date):
1173
+ day = f"{date.day:02d}"
1174
+ month = f"{date.month:02d}"
1175
+ year = f"{date.year:,}".replace(",", ".")
1176
+ return f"{day}/{month}/{year}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.2.6
3
+ Version: 1.3.36
4
4
  Summary: Librería de utilidades gráficas en PyQt6
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -0,0 +1,11 @@
1
+ gui_utilities/gui_utilities.py,sha256=-H8C-_C4fCj0tJr9Wudc8cVfPL5ij2s3I7yiwqEMqcA,46306
2
+ gui_utilities/icons/focused_hide_text_icon.png,sha256=0Ysx7vC-mEVfuSBWx1Zw-UhpqvrTCcIvnQ926wFmuK4,13084
3
+ gui_utilities/icons/focused_show_text_icon.png,sha256=gmZU7RR4FN-9VSzpD00ZkQ8UGbihO2y808Kh3b_TaEg,6739
4
+ gui_utilities/icons/hide_text_icon.png,sha256=f5jq6KaAygWNjzP_Ah6dw6eu8q5ml3m56JTeNSTSgEU,7207
5
+ gui_utilities/icons/show_text_icon.png,sha256=8Vdp2XickPEM-eTb1-qBXf3qmHldSzllMZZfObir9p8,5376
6
+ gui_utilities/tlds/tlds_list.txt,sha256=wIWmAQGVNsY0ZJy7qPW8kItDTCE4PTq8wcUhC2hpjkw,10916
7
+ gui_utilities-1.3.36.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
8
+ gui_utilities-1.3.36.dist-info/METADATA,sha256=fmC5wa_5Q93fAvmZu7HCz9mHWe84ONRtj6ong8WjMuA,266
9
+ gui_utilities-1.3.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ gui_utilities-1.3.36.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
11
+ gui_utilities-1.3.36.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- gui_utilities/gui_utilities.py,sha256=kSOOg4rN4xBujiEMwp0xFQze__mZc86X7mNNMVKtSwc,36305
2
- gui_utilities/icons/focused_hide_text_icon.png,sha256=0Ysx7vC-mEVfuSBWx1Zw-UhpqvrTCcIvnQ926wFmuK4,13084
3
- gui_utilities/icons/focused_show_text_icon.png,sha256=gmZU7RR4FN-9VSzpD00ZkQ8UGbihO2y808Kh3b_TaEg,6739
4
- gui_utilities/icons/hide_text_icon.png,sha256=f5jq6KaAygWNjzP_Ah6dw6eu8q5ml3m56JTeNSTSgEU,7207
5
- gui_utilities/icons/show_text_icon.png,sha256=8Vdp2XickPEM-eTb1-qBXf3qmHldSzllMZZfObir9p8,5376
6
- gui_utilities/tlds/tlds_list.txt,sha256=wIWmAQGVNsY0ZJy7qPW8kItDTCE4PTq8wcUhC2hpjkw,10916
7
- gui_utilities-1.2.6.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
8
- gui_utilities-1.2.6.dist-info/METADATA,sha256=3uptNmWtDgIPTDfUN-tSDcUaN_lAtB7L5PobVepe8fs,265
9
- gui_utilities-1.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- gui_utilities-1.2.6.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
11
- gui_utilities-1.2.6.dist-info/RECORD,,