gui-utilities 1.1.10__py3-none-any.whl → 1.2.21__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.
@@ -1,5 +1,5 @@
1
1
  from PyQt6.QtCore import Qt, QObject, QEvent, QSize
2
- from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QLineEdit, QComboBox, QDialog, QToolButton, QWidgetAction, QCheckBox
2
+ from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QLineEdit, QComboBox, QDialog, QToolButton, QWidgetAction, QCheckBox, QTableWidget, QHeaderView
3
3
  from PyQt6.QtGui import QIcon
4
4
  import re
5
5
  import requests
@@ -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_top = None,
31
+ title_padding_right = None,
32
+ title_padding_bottom = None,
33
+ title_padding_left = 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_top = title_padding_top,
48
+ padding_right = title_padding_right,
49
+ padding_bottom = title_padding_bottom,
50
+ padding_left = title_padding_left,
43
51
  border_width = title_border_width,
44
52
  border_color = title_border_color,
45
53
  border_radius = title_border_radius
@@ -84,6 +92,10 @@ def create_title(
84
92
  font_color = "#ffffff",
85
93
  background_color = "#1e1e1e",
86
94
  padding = 15,
95
+ padding_top = None,
96
+ padding_right = None,
97
+ padding_bottom = None,
98
+ padding_left = None,
87
99
  border_width = 0,
88
100
  border_color = "#ffffff",
89
101
  border_radius = 0
@@ -99,6 +111,10 @@ def create_title(
99
111
  font_weight = "bold",
100
112
  background_color = background_color,
101
113
  padding = padding,
114
+ padding_top = padding_top,
115
+ padding_right = padding_right,
116
+ padding_bottom = padding_bottom,
117
+ padding_left = padding_left,
102
118
  border_width = border_width,
103
119
  border_color = border_color,
104
120
  border_radius = border_radius
@@ -114,18 +130,29 @@ def create_label(
114
130
  font_weight = "normal",
115
131
  background_color = "#1e1e1e",
116
132
  padding = 15,
133
+ padding_top = None,
134
+ padding_right = None,
135
+ padding_bottom = None,
136
+ padding_left = None,
117
137
  border_width = 0,
118
138
  border_color = "#ffffff",
119
139
  border_radius = 0
120
140
  ):
121
141
  label = QLabel(text)
142
+ padding_top_value = padding_top if padding_top is not None else padding
143
+ padding_right_value = padding_right if padding_right is not None else padding
144
+ 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
122
146
  style = f"""
123
147
  font-family: {font_family};
124
148
  font-size: {font_size}px;
125
149
  color: {font_color};
126
150
  font-weight: {font_weight};
127
151
  background-color: {background_color};
128
- padding: {padding}px;
152
+ padding-top: {padding_top_value}px;
153
+ padding-right: {padding_right_value}px;
154
+ padding-bottom: {padding_bottom_value}px;
155
+ padding-left: {padding_left_value}px;
129
156
  border: {border_width}px solid {border_color};
130
157
  border-radius: {border_radius}px;
131
158
  """
@@ -140,6 +167,10 @@ def create_button(
140
167
  font_weight = "bold",
141
168
  background_color = "#1e1e1e",
142
169
  padding = 15,
170
+ padding_top = None,
171
+ padding_right = None,
172
+ padding_bottom = None,
173
+ padding_left = None,
143
174
  border_width = 2,
144
175
  border_color = "#5c5c5c",
145
176
  border_radius = 0,
@@ -155,6 +186,10 @@ def create_button(
155
186
  disabled_border_color = "#4a4a4a"
156
187
  ):
157
188
  button = QPushButton(text)
189
+ padding_top_value = padding_top if padding_top is not None else padding
190
+ padding_right_value = padding_right if padding_right is not None else padding
191
+ padding_bottom_value = padding_bottom if padding_bottom is not None else padding
192
+ padding_left_value = padding_left if padding_left is not None else padding
158
193
  style_sheet = f"""
159
194
  QPushButton {{
160
195
  font-family: {font_family};
@@ -162,7 +197,10 @@ def create_button(
162
197
  color: {font_color};
163
198
  font-weight: {font_weight};
164
199
  background-color: {background_color};
165
- padding: {padding}px;
200
+ padding-top: {padding_top_value}px;
201
+ padding-right: {padding_right_value}px;
202
+ padding-bottom: {padding_bottom_value}px;
203
+ padding-left: {padding_left_value}px;
166
204
  border: {border_width}px solid {border_color};
167
205
  border-radius: {border_radius}px;
168
206
  }}
@@ -191,6 +229,10 @@ def create_text_box(
191
229
  font_weight = "normal",
192
230
  background_color = "#1e1e1e",
193
231
  padding = 15,
232
+ padding_top = None,
233
+ padding_right = None,
234
+ padding_bottom = None,
235
+ padding_left = None,
194
236
  border_width = 2,
195
237
  border_color = "#5c5c5c",
196
238
  border_radius = 0,
@@ -212,6 +254,10 @@ def create_text_box(
212
254
  ):
213
255
  text_box = QLineEdit()
214
256
  text_box.setPlaceholderText(placeholder_text)
257
+ padding_top_value = padding_top if padding_top is not None else padding
258
+ padding_right_value = padding_right if padding_right is not None else padding
259
+ 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
215
261
  style_sheet = f"""
216
262
  QLineEdit {{
217
263
  font-family: {font_family};
@@ -219,7 +265,10 @@ def create_text_box(
219
265
  color: {font_color};
220
266
  font-weight: {font_weight};
221
267
  background-color: {background_color};
222
- padding: {padding}px;
268
+ padding-top: {padding_top_value}px;
269
+ padding-right: {padding_right_value}px;
270
+ padding-bottom: {padding_bottom_value}px;
271
+ padding-left: {padding_left_value}px;
223
272
  border: {border_width}px solid {border_color};
224
273
  border-radius: {border_radius}px;
225
274
  }}
@@ -253,12 +302,9 @@ def create_text_box(
253
302
  toggle_text_visibility_action.setDefaultWidget(toggle_text_visibility_button)
254
303
  style_sheet = f"""
255
304
  QToolButton {{
256
- border: none;
257
- margin-right: 10px;
258
- }}
259
- QToolButton:hover, QToolButton:pressed {{
260
305
  background-color: transparent;
261
306
  border: none;
307
+ margin-right: 10px;
262
308
  }}
263
309
  """
264
310
  toggle_text_visibility_button.setStyleSheet(style_sheet)
@@ -297,6 +343,10 @@ def create_combo_box(
297
343
  font_color = "#ffffff",
298
344
  background_color = "#1e1e1e",
299
345
  padding = 15,
346
+ padding_top = None,
347
+ padding_right = None,
348
+ padding_bottom = None,
349
+ padding_left = None,
300
350
  border_width = 2,
301
351
  border_color = "#5c5c5c",
302
352
  border_radius = 0,
@@ -318,6 +368,11 @@ def create_combo_box(
318
368
  combo_box.addItems(items)
319
369
  combo_box.setCurrentIndex(-1)
320
370
 
371
+ padding_top_value = padding_top if padding_top is not None else padding
372
+ padding_right_value = padding_right if padding_right is not None else padding
373
+ 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
+
321
376
  def get_stylesheet(font_color):
322
377
  return f"""
323
378
  QComboBox {{
@@ -325,7 +380,10 @@ def create_combo_box(
325
380
  font-size: {font_size}px;
326
381
  color: {font_color};
327
382
  background-color: {background_color};
328
- padding: {padding}px;
383
+ padding-top: {padding_top_value}px;
384
+ padding-right: {padding_right_value}px;
385
+ padding-bottom: {padding_bottom_value}px;
386
+ padding-left: {padding_left_value}px;
329
387
  border: {border_width}px solid {border_color};
330
388
  border-radius: {border_radius}px;
331
389
  }}
@@ -363,35 +421,49 @@ def create_checkbox(
363
421
  font_size = 14,
364
422
  font_color = "#ffffff",
365
423
  background_color = "#1e1e1e",
366
- padding = 15,
424
+ padding = 5,
425
+ padding_top = None,
426
+ padding_right = None,
427
+ padding_bottom = None,
428
+ padding_left = None,
367
429
  indicator_background_color = "#1e1e1e",
368
430
  indicator_border_width = 1,
369
431
  indicator_border_color = "#5c5c5c",
370
- indicator_border_radius = 100,
432
+ indicator_border_radius = 8,
371
433
  hover_indicator_background_color = "#333333",
372
434
  hover_indicator_border_width = 2,
373
435
  hover_indicator_border_color = "#777777",
374
436
  pressed_indicator_background_color = "#4a4a4a",
375
437
  pressed_indicator_border_width = 2,
376
438
  pressed_indicator_border_color = "#0078d7",
377
- checked_indicator_background_color = "#0078d7",
378
- checked_indicator_border_width = 2,
379
- checked_indicator_border_color = "#ffffff",
439
+ checked_indicator_background_color = "#ffffff",
440
+ checked_indicator_border_width = 1,
441
+ checked_indicator_border_color = "#5c5c5c",
380
442
  disabled_font_color = "#888888",
381
443
  disabled_background_color = "#2d2d2d",
382
444
  disabled_border_width = 1,
383
445
  disabled_border_color = "#4a4a4a"
384
446
  ):
385
447
  check_box = QCheckBox(text)
448
+ padding_top_value = padding_top if padding_top is not None else padding
449
+ padding_right_value = padding_right if padding_right is not None else padding
450
+ 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
386
452
  style_sheet = f"""
387
453
  QCheckBox {{
388
454
  font-family: {font_family};
389
455
  font-size: {font_size}px;
390
456
  color: {font_color};
391
457
  background-color: {background_color};
392
- padding: {padding}px;
458
+ padding-top: {padding_top_value}px;
459
+ padding-right: {padding_right_value}px;
460
+ padding-bottom: {padding_bottom_value}px;
461
+ padding-left: {padding_left_value}px;
393
462
  }}
394
463
  QCheckBox::indicator {{
464
+ image: none;
465
+ width: {font_size}px;
466
+ height: {font_size}px;
395
467
  background-color: {indicator_background_color};
396
468
  border: {indicator_border_width}px solid {indicator_border_color};
397
469
  border-radius: {indicator_border_radius}px;
@@ -408,8 +480,10 @@ def create_checkbox(
408
480
  background-color: {checked_indicator_background_color};
409
481
  border: {checked_indicator_border_width}px solid {checked_indicator_border_color};
410
482
  }}
411
- QCheckBox::indicator:disabled {{
483
+ QCheckBox:disabled {{
412
484
  color: {disabled_font_color};
485
+ }}
486
+ QCheckBox::indicator:disabled {{
413
487
  background-color: {disabled_background_color};
414
488
  border: {disabled_border_width}px solid {disabled_border_color};
415
489
  }}
@@ -432,6 +506,10 @@ def create_information_message_box(
432
506
  label_font_size = 14,
433
507
  label_font_color = "#ffffff",
434
508
  label_padding = 15,
509
+ label_padding_top = None,
510
+ label_padding_right = None,
511
+ label_padding_bottom = None,
512
+ label_padding_left = None,
435
513
  label_border_width = 0,
436
514
  label_border_color = "#ffffff",
437
515
  label_border_radius = 0,
@@ -441,6 +519,10 @@ def create_information_message_box(
441
519
  button_font_color = "#ffffff",
442
520
  button_background_color = "#1e1e1e",
443
521
  button_padding = 15,
522
+ button_padding_top = None,
523
+ button_padding_right = None,
524
+ button_padding_bottom = None,
525
+ button_padding_left = None,
444
526
  button_border_width = 2,
445
527
  button_border_color = "#5c5c5c",
446
528
  button_border_radius = 0,
@@ -458,7 +540,8 @@ def create_information_message_box(
458
540
  message_box = QDialog()
459
541
  message_box.setObjectName("message_box")
460
542
  message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
461
- message_box.setMaximumWidth(480)
543
+ message_box.setMinimumWidth(360)
544
+ message_box.setMaximumWidth(360)
462
545
  style_sheet = f"""
463
546
  QDialog#message_box {{
464
547
  background-color: {background_color};
@@ -478,12 +561,15 @@ def create_information_message_box(
478
561
  font_color= label_font_color,
479
562
  background_color = "transparent",
480
563
  padding = label_padding,
564
+ padding_top = label_padding_top,
565
+ padding_right = label_padding_right,
566
+ padding_bottom = label_padding_bottom,
567
+ padding_left = label_padding_left,
481
568
  border_width = label_border_width,
482
569
  border_color = label_border_color,
483
570
  border_radius = label_border_radius
484
571
  )
485
572
  main_layout.addWidget(text_label)
486
-
487
573
  accept_button = create_button(
488
574
  text = button_text,
489
575
  font_family = button_font_family,
@@ -491,6 +577,10 @@ def create_information_message_box(
491
577
  font_color = button_font_color,
492
578
  background_color = button_background_color,
493
579
  padding = button_padding,
580
+ padding_top = button_padding_top,
581
+ padding_right = button_padding_right,
582
+ padding_bottom = button_padding_bottom,
583
+ padding_left = button_padding_left,
494
584
  border_width = button_border_width,
495
585
  border_color = button_border_color,
496
586
  border_radius = button_border_radius,
@@ -525,6 +615,10 @@ def create_confirmation_message_box(
525
615
  label_font_size = 14,
526
616
  label_font_color = "#ffffff",
527
617
  label_padding = 15,
618
+ label_padding_top = None,
619
+ label_padding_right = None,
620
+ label_padding_bottom = None,
621
+ label_padding_left = None,
528
622
  label_border_width = 0,
529
623
  label_border_color = "#ffffff",
530
624
  label_border_radius = 0,
@@ -533,6 +627,10 @@ def create_confirmation_message_box(
533
627
  button_font_color = "#ffffff",
534
628
  button_background_color = "#1e1e1e",
535
629
  button_padding = 15,
630
+ button_padding_top = None,
631
+ button_padding_right = None,
632
+ button_padding_bottom = None,
633
+ button_padding_left = None,
536
634
  button_border_width = 2,
537
635
  button_border_color = "#5c5c5c",
538
636
  button_border_radius = 0,
@@ -550,7 +648,8 @@ def create_confirmation_message_box(
550
648
  confirm_message_box = QDialog()
551
649
  confirm_message_box.setObjectName("confirm_message_box")
552
650
  confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
553
- confirm_message_box.setMaximumWidth(480)
651
+ confirm_message_box.setMinimumWidth(360)
652
+ confirm_message_box.setMaximumWidth(360)
554
653
  style_sheet = f"""
555
654
  QDialog#confirm_message_box {{
556
655
  background-color: {background_color};
@@ -563,8 +662,6 @@ def create_confirmation_message_box(
563
662
  confirm_message_box.setLayout(main_layout)
564
663
  main_layout.setContentsMargins(left_margin, top_margin, right_margin, bottom_margin)
565
664
  main_layout.setSpacing(main_spacing)
566
- text_layout = QHBoxLayout()
567
- main_layout.addLayout(text_layout)
568
665
  text_label = create_label(
569
666
  text = text,
570
667
  font_family = label_font_family,
@@ -572,11 +669,15 @@ def create_confirmation_message_box(
572
669
  font_color = label_font_color,
573
670
  background_color = "transparent",
574
671
  padding = label_padding,
672
+ padding_top = label_padding_top,
673
+ padding_right = label_padding_right,
674
+ padding_bottom = label_padding_bottom,
675
+ padding_left = label_padding_left,
575
676
  border_width = label_border_width,
576
677
  border_color = label_border_color,
577
678
  border_radius = label_border_radius
578
679
  )
579
- text_layout.addWidget(text_label)
680
+ main_layout.addWidget(text_label)
580
681
  buttons_layout = QHBoxLayout()
581
682
  main_layout.addLayout(buttons_layout)
582
683
  buttons_layout.setSpacing(button_spacing)
@@ -587,6 +688,10 @@ def create_confirmation_message_box(
587
688
  font_color = button_font_color,
588
689
  background_color = button_background_color,
589
690
  padding = button_padding,
691
+ padding_top = button_padding_top,
692
+ padding_right = button_padding_right,
693
+ padding_bottom = button_padding_bottom,
694
+ padding_left = button_padding_left,
590
695
  border_width = button_border_width,
591
696
  border_color = button_border_color,
592
697
  border_radius = button_border_radius,
@@ -610,6 +715,10 @@ def create_confirmation_message_box(
610
715
  font_color = button_font_color,
611
716
  background_color = button_background_color,
612
717
  padding = button_padding,
718
+ padding_top = button_padding_top,
719
+ padding_right = button_padding_right,
720
+ padding_bottom = button_padding_bottom,
721
+ padding_left = button_padding_left,
613
722
  border_width = button_border_width,
614
723
  border_color = button_border_color,
615
724
  border_radius = button_border_radius,
@@ -628,6 +737,122 @@ def create_confirmation_message_box(
628
737
  decline_button.clicked.connect(confirm_message_box.reject)
629
738
  return confirm_message_box
630
739
 
740
+ def create_list_table(
741
+ items_data,
742
+ column_headers,
743
+ column_proportions,
744
+ row_populator_function,
745
+ font_family = "Segoe UI",
746
+ font_size = 14,
747
+ font_color = "#ffffff",
748
+ background_color = "#1e1e1e",
749
+ border_width = 2,
750
+ border_color = "#5c5c5c",
751
+ item_font_color = "#ffffff",
752
+ item_background_color = "#1e1e1e",
753
+ selected_item_background_color = "#0078d7",
754
+ header_font_family = "Segoe UI",
755
+ header_font_size = 14,
756
+ header_font_color = "#ffffff",
757
+ header_font_weight = "bold",
758
+ header_background_color = "#1e1e1e",
759
+ header_border_width = 1,
760
+ header_border_color = "#191919",
761
+ hover_header_background_color = "#333333",
762
+ hover_header_border_width = 3,
763
+ hover_header_border_color = "#777777",
764
+ pressed_header_background_color = "#4a4a4a",
765
+ pressed_header_border_width = 3,
766
+ pressed_header_border_color = "#0078d7",
767
+ scrollbar_background_color = "#1e1e1e",
768
+ scrollbar_handle_background_color = "#333333",
769
+ hover_scrollbar_handle_background_color = "#4a4a4a",
770
+ hover_scrollbar_handle_border_width = 3,
771
+ hover_scrollbar_handle_border_color = "#777777",
772
+ pressed_scrollbar_handle_background_color = "#4a4a4a",
773
+ pressed_scrollbar_handle_border_width = 3,
774
+ pressed_scrollbar_handle_border_color = "#0078d7"
775
+ ):
776
+ list_table = QTableWidget()
777
+ list_table.verticalHeader().setVisible(False)
778
+ list_table.setColumnCount(len(column_headers))
779
+ list_table.setHorizontalHeaderLabels(column_headers)
780
+ header = list_table.horizontalHeader()
781
+ header.setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
782
+
783
+ def resize_columns():
784
+ total_width = list_table.viewport().width()
785
+ if total_width == 0: return
786
+ for i, proportion in enumerate(column_proportions):
787
+ list_table.setColumnWidth(i, int(total_width * proportion))
788
+
789
+ resize_columns()
790
+ original_resize_event = list_table.resizeEvent
791
+
792
+ def on_resize(event):
793
+ resize_columns()
794
+ if original_resize_event: original_resize_event(event)
795
+
796
+ list_table.resizeEvent = on_resize
797
+ style_sheet = f"""
798
+ QTableWidget {{
799
+ color: {font_color};
800
+ background-color: {background_color};
801
+ font-family: {font_family};
802
+ font-size: {font_size}px;
803
+ border: {border_width}px solid {border_color};
804
+ }}
805
+ QTableWidget::item {{
806
+ color: {item_font_color};
807
+ background-color: {item_background_color};
808
+ border: none;
809
+ }}
810
+ QTableWidget::item:selected {{
811
+ background-color: {selected_item_background_color};
812
+ }}
813
+ QHeaderView::section {{
814
+ color: {header_font_color};
815
+ background-color: {header_background_color};
816
+ font-family: {header_font_family};
817
+ font-size: {header_font_size}px;
818
+ font-weight: {header_font_weight};
819
+ border: {header_border_width}px solid {header_border_color};
820
+ }}
821
+ QHeaderView::section:hover {{
822
+ background-color: {hover_header_background_color};
823
+ border: {hover_header_border_width}px solid {hover_header_border_color};
824
+ }}
825
+ QHeaderView::section:pressed {{
826
+ background-color: {pressed_header_background_color};
827
+ border: {pressed_header_border_width}px solid {pressed_header_border_color};
828
+ }}
829
+ QScrollBar:vertical {{
830
+ background-color: {scrollbar_background_color};
831
+ border: none;
832
+ }}
833
+ QScrollBar::handle:vertical {{
834
+ background-color: {scrollbar_handle_background_color};
835
+ border: none;
836
+ }}
837
+ QScrollBar::handle:vertical:hover {{
838
+ background-color: {hover_scrollbar_handle_background_color};
839
+ border: {hover_scrollbar_handle_border_width}px solid {hover_scrollbar_handle_border_color};
840
+ }}
841
+ QScrollBar::handle:vertical:pressed {{
842
+ background-color: {pressed_scrollbar_handle_background_color};
843
+ border: {pressed_scrollbar_handle_border_width}px solid {pressed_scrollbar_handle_border_color};
844
+ }}
845
+ """
846
+ list_table.setStyleSheet(style_sheet)
847
+ list_table.setRowCount(len(items_data))
848
+ for row, item_data in enumerate(items_data):
849
+ items = row_populator_function(item_data)
850
+ for item in items:
851
+ item.setTextAlignment(Qt.AlignmentFlag.AlignCenter)
852
+ for column, item in enumerate(items):
853
+ list_table.setItem(row, column, item)
854
+ return list_table
855
+
631
856
  def confirm_exit(
632
857
  window,
633
858
  background_color = "#1e1e1e",
@@ -638,6 +863,10 @@ def confirm_exit(
638
863
  label_font_size = 14,
639
864
  label_font_color = "#ffffff",
640
865
  label_padding = 15,
866
+ label_padding_top = None,
867
+ label_padding_right = None,
868
+ label_padding_bottom = None,
869
+ label_padding_left = None,
641
870
  label_border_width = 0,
642
871
  label_border_color = "#ffffff",
643
872
  label_border_radius = 0,
@@ -646,6 +875,10 @@ def confirm_exit(
646
875
  button_font_color = "#ffffff",
647
876
  button_background_color = "#1e1e1e",
648
877
  button_padding = 15,
878
+ button_padding_top = None,
879
+ button_padding_right = None,
880
+ button_padding_bottom = None,
881
+ button_padding_left = None,
649
882
  button_border_width = 2,
650
883
  button_border_color = "#5c5c5c",
651
884
  button_border_radius = 0,
@@ -670,6 +903,10 @@ def confirm_exit(
670
903
  label_font_size = label_font_size,
671
904
  label_font_color = label_font_color,
672
905
  label_padding = label_padding,
906
+ label_padding_top = label_padding_top,
907
+ label_padding_right = label_padding_right,
908
+ label_padding_bottom = label_padding_bottom,
909
+ label_padding_left = label_padding_left,
673
910
  label_border_width = label_border_width,
674
911
  label_border_color = label_border_color,
675
912
  label_border_radius = label_border_radius,
@@ -678,6 +915,10 @@ def confirm_exit(
678
915
  button_font_color = button_font_color,
679
916
  button_background_color = button_background_color,
680
917
  button_padding = button_padding,
918
+ button_padding_top = button_padding_top,
919
+ button_padding_right = button_padding_right,
920
+ button_padding_bottom = button_padding_bottom,
921
+ button_padding_left = button_padding_left,
681
922
  button_border_width = button_border_width,
682
923
  button_border_color = button_border_color,
683
924
  button_border_radius = button_border_radius,
@@ -810,7 +1051,13 @@ def format_id(id_string):
810
1051
  elif len(clean_id) == 7: return f"{clean_id[0:1]}.{clean_id[1:4]}.{clean_id[4:7]}"
811
1052
  return id_string
812
1053
 
813
- def cellphone_number_format(cellphone_number):
1054
+ def format_cellphone_number(cellphone_number):
814
1055
  clean_number = "".join(filter(str.isdigit, cellphone_number))
815
1056
  if len(clean_number) == 10: return f"{clean_number[0:4]} - {clean_number[4:10]}"
816
- return cellphone_number
1057
+ return cellphone_number
1058
+
1059
+ def format_date(date):
1060
+ day = f"{date.day:02d}"
1061
+ month = f"{date.month:02d}"
1062
+ year = f"{date.year:,}".replace(",", ".")
1063
+ return f"{day}/{month}/{year}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.1.10
3
+ Version: 1.2.21
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=v7G_9X-5jWWLJv1bHk3pdh4lZbZi7AMIWEhRLAhlLOA,42009
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.21.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
8
+ gui_utilities-1.2.21.dist-info/METADATA,sha256=DlmwpzjLVssDHvF4D_hBGnm9MP2ny9DG64mcM5M1YCQ,266
9
+ gui_utilities-1.2.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ gui_utilities-1.2.21.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
11
+ gui_utilities-1.2.21.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- gui_utilities/gui_utilities.py,sha256=kLXT5eyDbUapBLTUxWtXVMGRjpz_RcLu1FCpsOaXjPQ,31616
2
- gui_utilities/icons/checked_verification_mark_icon.png,sha256=io3pvAu8cYugk5mmVGtGCKKzTSNLIINGMJcTySKv8e8,6587
3
- gui_utilities/icons/focused_hide_text_icon.png,sha256=0Ysx7vC-mEVfuSBWx1Zw-UhpqvrTCcIvnQ926wFmuK4,13084
4
- gui_utilities/icons/focused_show_text_icon.png,sha256=gmZU7RR4FN-9VSzpD00ZkQ8UGbihO2y808Kh3b_TaEg,6739
5
- gui_utilities/icons/hide_text_icon.png,sha256=f5jq6KaAygWNjzP_Ah6dw6eu8q5ml3m56JTeNSTSgEU,7207
6
- gui_utilities/icons/hover_verification_mark_icon.png,sha256=V--qmtXpVl1LNCusQEgRcJk8RU6pfzCqYCRNOoeZR5c,7382
7
- gui_utilities/icons/show_text_icon.png,sha256=8Vdp2XickPEM-eTb1-qBXf3qmHldSzllMZZfObir9p8,5376
8
- gui_utilities/tlds/tlds_list.txt,sha256=wIWmAQGVNsY0ZJy7qPW8kItDTCE4PTq8wcUhC2hpjkw,10916
9
- gui_utilities-1.1.10.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
10
- gui_utilities-1.1.10.dist-info/METADATA,sha256=96LGNAh-CYxL0Jf7eaw2AmiJ3dk0183ILKvtGrzd4jI,266
11
- gui_utilities-1.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- gui_utilities-1.1.10.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
13
- gui_utilities-1.1.10.dist-info/RECORD,,