gui-utilities 1.1.15__tar.gz → 1.2.1__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.

Files changed (18) hide show
  1. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/PKG-INFO +1 -1
  2. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/gui_utilities.py +122 -2
  3. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities.egg-info/PKG-INFO +1 -1
  4. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities.egg-info/SOURCES.txt +0 -2
  5. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/pyproject.toml +1 -1
  6. gui_utilities-1.1.15/gui_utilities/icons/checked_verification_mark_icon.png +0 -0
  7. gui_utilities-1.1.15/gui_utilities/icons/hover_verification_mark_icon.png +0 -0
  8. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/LICENSE +0 -0
  9. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/README.md +0 -0
  10. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/icons/focused_hide_text_icon.png +0 -0
  11. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/icons/focused_show_text_icon.png +0 -0
  12. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/icons/hide_text_icon.png +0 -0
  13. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/icons/show_text_icon.png +0 -0
  14. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities/tlds/tlds_list.txt +0 -0
  15. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities.egg-info/dependency_links.txt +0 -0
  16. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities.egg-info/requires.txt +0 -0
  17. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/gui_utilities.egg-info/top_level.txt +0 -0
  18. {gui_utilities-1.1.15 → gui_utilities-1.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.1.15
3
+ Version: 1.2.1
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
@@ -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
@@ -411,8 +411,10 @@ def create_checkbox(
411
411
  background-color: {checked_indicator_background_color};
412
412
  border: {checked_indicator_border_width}px solid {checked_indicator_border_color};
413
413
  }}
414
- QCheckBox::indicator:disabled {{
414
+ QCheckBox:disabled {{
415
415
  color: {disabled_font_color};
416
+ }}
417
+ QCheckBox::indicator:disabled {{
416
418
  background-color: {disabled_background_color};
417
419
  border: {disabled_border_width}px solid {disabled_border_color};
418
420
  }}
@@ -461,6 +463,7 @@ def create_information_message_box(
461
463
  message_box = QDialog()
462
464
  message_box.setObjectName("message_box")
463
465
  message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
466
+ message_box.setMinimumWidth(240)
464
467
  message_box.setMaximumWidth(480)
465
468
  style_sheet = f"""
466
469
  QDialog#message_box {{
@@ -553,6 +556,7 @@ def create_confirmation_message_box(
553
556
  confirm_message_box = QDialog()
554
557
  confirm_message_box.setObjectName("confirm_message_box")
555
558
  confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
559
+ confirm_message_box.setMinimumWidth(240)
556
560
  confirm_message_box.setMaximumWidth(480)
557
561
  style_sheet = f"""
558
562
  QDialog#confirm_message_box {{
@@ -631,6 +635,122 @@ def create_confirmation_message_box(
631
635
  decline_button.clicked.connect(confirm_message_box.reject)
632
636
  return confirm_message_box
633
637
 
638
+ def create_list_table(
639
+ items_data,
640
+ column_headers,
641
+ column_proportions,
642
+ row_populator_function,
643
+ font_family = "Segoe UI",
644
+ font_size = 14,
645
+ font_color = "#ffffff",
646
+ background_color = "#1e1e1e",
647
+ border_width = 2,
648
+ border_color = "#5c5c5c",
649
+ item_font_color = "#ffffff",
650
+ item_background_color = "#1e1e1e",
651
+ selected_item_background_color = "#0078d7",
652
+ header_font_family = "Segoe UI",
653
+ header_font_size = 14,
654
+ header_font_color = "#ffffff",
655
+ header_font_weight = "bold",
656
+ header_background_color = "#1e1e1e",
657
+ header_border_width = 0,
658
+ header_border_color = "#5c5c5c",
659
+ hover_header_background_color = "#333333",
660
+ hover_header_border_width = 3,
661
+ hover_header_border_color = "#777777",
662
+ pressed_header_background_color = "#4a4a4a",
663
+ pressed_header_border_width = 3,
664
+ pressed_header_border_color = "#0078d7",
665
+ scrollbar_background_color = "#1e1e1e",
666
+ scrollbar_handle_background_color = "#333333",
667
+ hover_scrollbar_handle_background_color = "#4a4a4a",
668
+ hover_scrollbar_handle_border_width = 3,
669
+ hover_scrollbar_handle_border_color = "#777777",
670
+ pressed_scrollbar_handle_background_color = "#4a4a4a",
671
+ pressed_scrollbar_handle_border_width = 3,
672
+ pressed_scrollbar_handle_border_color = "#0078d7"
673
+ ):
674
+ list_table = QTableWidget()
675
+ list_table.verticalHeader().setVisible(False)
676
+ list_table.setColumnCount(len(column_headers))
677
+ list_table.setHorizontalHeaderLabels(column_headers)
678
+ header = list_table.horizontalHeader()
679
+ header.setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
680
+
681
+ def resize_columns():
682
+ total_width = list_table.viewport().width()
683
+ if total_width == 0: return
684
+ for i, proportion in enumerate(column_proportions):
685
+ list_table.setColumnWidth(i, int(total_width * proportion))
686
+
687
+ resize_columns()
688
+ original_resize_event = list_table.resizeEvent
689
+
690
+ def on_resize(event):
691
+ resize_columns()
692
+ if original_resize_event: original_resize_event(event)
693
+
694
+ list_table.resizeEvent = on_resize
695
+ style_sheet = f"""
696
+ QTableWidget {{
697
+ color: {font_color};
698
+ background-color: {background_color};
699
+ font-family: {font_family};
700
+ font-size: {font_size}px;
701
+ border: {border_width}px solid {border_color};
702
+ }}
703
+ QTableWidget::item {{
704
+ color: {item_font_color};
705
+ background-color: {item_background_color};
706
+ border: none;
707
+ }}
708
+ QTableWidget::item:selected {{
709
+ background-color: {selected_item_background_color};
710
+ }}
711
+ QHeaderView::section {{
712
+ color: {header_font_color};
713
+ background-color: {header_background_color};
714
+ font-family: {header_font_family};
715
+ font-size: {header_font_size}px;
716
+ font-weight: {header_font_weight};
717
+ border: {header_border_width}px solid {header_border_color};
718
+ }}
719
+ QHeaderView::section:hover {{
720
+ background-color: {hover_header_background_color};
721
+ border: {hover_header_border_width}px solid {hover_header_border_color};
722
+ }}
723
+ QHeaderView::section:pressed {{
724
+ background-color: {pressed_header_background_color};
725
+ border: {pressed_header_border_width}px solid {pressed_header_border_color};
726
+ }}
727
+ QScrollBar:vertical {{
728
+ background-color: {scrollbar_background_color};
729
+ border: none;
730
+ }}
731
+ QScrollBar::handle:vertical {{
732
+ background-color: {scrollbar_handle_background_color};
733
+ border: none;
734
+ }}
735
+ QScrollBar::handle:vertical:hover {{
736
+ background-color: {hover_scrollbar_handle_background_color};
737
+ border: {hover_scrollbar_handle_border_width}px solid {hover_scrollbar_handle_border_color};
738
+ }}
739
+ QScrollBar::handle:vertical:pressed {{
740
+ background-color: {pressed_scrollbar_handle_background_color};
741
+ border: {pressed_scrollbar_handle_border_width}px solid {pressed_scrollbar_handle_border_color};
742
+ }}
743
+ """
744
+ list_table.setStyleSheet(style_sheet)
745
+ list_table.setRowCount(len(items_data))
746
+ for row, item_data in enumerate(items_data):
747
+ items = row_populator_function(item_data)
748
+ for item in items:
749
+ item.setTextAlignment(Qt.AlignmentFlag.AlignCenter)
750
+ for column, item in enumerate(items):
751
+ list_table.setItem(row, column, item)
752
+ return list_table
753
+
634
754
  def confirm_exit(
635
755
  window,
636
756
  background_color = "#1e1e1e",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.1.15
3
+ Version: 1.2.1
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
@@ -7,10 +7,8 @@ gui_utilities.egg-info/SOURCES.txt
7
7
  gui_utilities.egg-info/dependency_links.txt
8
8
  gui_utilities.egg-info/requires.txt
9
9
  gui_utilities.egg-info/top_level.txt
10
- gui_utilities/icons/checked_verification_mark_icon.png
11
10
  gui_utilities/icons/focused_hide_text_icon.png
12
11
  gui_utilities/icons/focused_show_text_icon.png
13
12
  gui_utilities/icons/hide_text_icon.png
14
- gui_utilities/icons/hover_verification_mark_icon.png
15
13
  gui_utilities/icons/show_text_icon.png
16
14
  gui_utilities/tlds/tlds_list.txt
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gui_utilities"
3
- version = "1.1.15"
3
+ version = "1.2.1"
4
4
  description = "Librería de utilidades gráficas en PyQt6"
5
5
  authors = [{name = "Guido Iván Gross", email = "grossguidoivan@gmail.com"}]
6
6
  requires-python = ">=3.8"
File without changes
File without changes
File without changes