gui-utilities 1.1.15__tar.gz → 1.2.0__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.1.15 → gui_utilities-1.2.0}/PKG-INFO +1 -1
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/gui_utilities.py +119 -1
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities.egg-info/PKG-INFO +1 -1
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities.egg-info/SOURCES.txt +0 -2
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/pyproject.toml +1 -1
- gui_utilities-1.1.15/gui_utilities/icons/checked_verification_mark_icon.png +0 -0
- gui_utilities-1.1.15/gui_utilities/icons/hover_verification_mark_icon.png +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/LICENSE +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/README.md +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/icons/focused_hide_text_icon.png +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/icons/focused_show_text_icon.png +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/icons/hide_text_icon.png +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/icons/show_text_icon.png +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities/tlds/tlds_list.txt +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities.egg-info/dependency_links.txt +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities.egg-info/requires.txt +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/gui_utilities.egg-info/top_level.txt +0 -0
- {gui_utilities-1.1.15 → gui_utilities-1.2.0}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -461,6 +461,7 @@ def create_information_message_box(
|
|
|
461
461
|
message_box = QDialog()
|
|
462
462
|
message_box.setObjectName("message_box")
|
|
463
463
|
message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
464
|
+
message_box.setMinimumWidth(240)
|
|
464
465
|
message_box.setMaximumWidth(480)
|
|
465
466
|
style_sheet = f"""
|
|
466
467
|
QDialog#message_box {{
|
|
@@ -553,6 +554,7 @@ def create_confirmation_message_box(
|
|
|
553
554
|
confirm_message_box = QDialog()
|
|
554
555
|
confirm_message_box.setObjectName("confirm_message_box")
|
|
555
556
|
confirm_message_box.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
|
557
|
+
confirm_message_box.setMinimumWidth(240)
|
|
556
558
|
confirm_message_box.setMaximumWidth(480)
|
|
557
559
|
style_sheet = f"""
|
|
558
560
|
QDialog#confirm_message_box {{
|
|
@@ -631,6 +633,122 @@ def create_confirmation_message_box(
|
|
|
631
633
|
decline_button.clicked.connect(confirm_message_box.reject)
|
|
632
634
|
return confirm_message_box
|
|
633
635
|
|
|
636
|
+
def create_list_table(
|
|
637
|
+
items_data,
|
|
638
|
+
column_headers,
|
|
639
|
+
column_proportions,
|
|
640
|
+
row_populator_function,
|
|
641
|
+
font_family = "Segoe UI",
|
|
642
|
+
font_size = 14,
|
|
643
|
+
font_color = "#ffffff",
|
|
644
|
+
background_color = "#1e1e1e",
|
|
645
|
+
border_width = 2,
|
|
646
|
+
border_color = "#5c5c5c",
|
|
647
|
+
item_font_color = "#ffffff",
|
|
648
|
+
item_background_color = "#1e1e1e",
|
|
649
|
+
selected_item_background_color = "#0078d7",
|
|
650
|
+
header_font_family = "Segoe UI",
|
|
651
|
+
header_font_size = 14,
|
|
652
|
+
header_font_color = "#ffffff",
|
|
653
|
+
header_font_weight = "bold",
|
|
654
|
+
header_background_color = "#1e1e1e",
|
|
655
|
+
header_border_width = 0,
|
|
656
|
+
header_border_color = "#5c5c5c",
|
|
657
|
+
hover_header_background_color = "#333333",
|
|
658
|
+
hover_header_border_width = 3,
|
|
659
|
+
hover_header_border_color = "#777777",
|
|
660
|
+
pressed_header_background_color = "#4a4a4a",
|
|
661
|
+
pressed_header_border_width = 3,
|
|
662
|
+
pressed_header_border_color = "#0078d7",
|
|
663
|
+
scrollbar_background_color = "#1e1e1e",
|
|
664
|
+
scrollbar_handle_background_color = "#333333",
|
|
665
|
+
hover_scrollbar_handle_background_color = "#4a4a4a",
|
|
666
|
+
hover_scrollbar_handle_border_width = 3,
|
|
667
|
+
hover_scrollbar_handle_border_color = "#777777",
|
|
668
|
+
pressed_scrollbar_handle_background_color = "#4a4a4a",
|
|
669
|
+
pressed_scrollbar_handle_border_width = 3,
|
|
670
|
+
pressed_scrollbar_handle_border_color = "#0078d7"
|
|
671
|
+
):
|
|
672
|
+
list_table = QTableWidget()
|
|
673
|
+
list_table.verticalHeader().setVisible(False)
|
|
674
|
+
list_table.setColumnCount(len(column_headers))
|
|
675
|
+
list_table.setHorizontalHeaderLabels(column_headers)
|
|
676
|
+
header = list_table.horizontalHeader()
|
|
677
|
+
header.setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
|
|
678
|
+
|
|
679
|
+
def resize_columns():
|
|
680
|
+
total_width = list_table.viewport().width()
|
|
681
|
+
if total_width == 0: return
|
|
682
|
+
for i, proportion in enumerate(column_proportions):
|
|
683
|
+
list_table.setColumnWidth(i, int(total_width * proportion))
|
|
684
|
+
|
|
685
|
+
resize_columns()
|
|
686
|
+
original_resize_event = list_table.resizeEvent
|
|
687
|
+
|
|
688
|
+
def on_resize(event):
|
|
689
|
+
resize_columns()
|
|
690
|
+
if original_resize_event: original_resize_event(event)
|
|
691
|
+
|
|
692
|
+
list_table.resizeEvent = on_resize
|
|
693
|
+
style_sheet = f"""
|
|
694
|
+
QTableWidget {{
|
|
695
|
+
color: {font_color};
|
|
696
|
+
background-color: {background_color};
|
|
697
|
+
font-family: {font_family};
|
|
698
|
+
font-size: {font_size}px;
|
|
699
|
+
border: {border_width}px solid {border_color};
|
|
700
|
+
}}
|
|
701
|
+
QTableWidget::item {{
|
|
702
|
+
color: {item_font_color};
|
|
703
|
+
background-color: {item_background_color};
|
|
704
|
+
border: none;
|
|
705
|
+
}}
|
|
706
|
+
QTableWidget::item:selected {{
|
|
707
|
+
background-color: {selected_item_background_color};
|
|
708
|
+
}}
|
|
709
|
+
QHeaderView::section {{
|
|
710
|
+
color: {header_font_color};
|
|
711
|
+
background-color: {header_background_color};
|
|
712
|
+
font-family: {header_font_family};
|
|
713
|
+
font-size: {header_font_size}px;
|
|
714
|
+
font-weight: {header_font_weight};
|
|
715
|
+
border: {header_border_width}px solid {header_border_color};
|
|
716
|
+
}}
|
|
717
|
+
QHeaderView::section:hover {{
|
|
718
|
+
background-color: {hover_header_background_color};
|
|
719
|
+
border: {hover_header_border_width}px solid {hover_header_border_color};
|
|
720
|
+
}}
|
|
721
|
+
QHeaderView::section:pressed {{
|
|
722
|
+
background-color: {pressed_header_background_color};
|
|
723
|
+
border: {pressed_header_border_width}px solid {pressed_header_border_color};
|
|
724
|
+
}}
|
|
725
|
+
QScrollBar:vertical {{
|
|
726
|
+
background-color: {scrollbar_background_color};
|
|
727
|
+
border: none;
|
|
728
|
+
}}
|
|
729
|
+
QScrollBar::handle:vertical {{
|
|
730
|
+
background-color: {scrollbar_handle_background_color};
|
|
731
|
+
border: none;
|
|
732
|
+
}}
|
|
733
|
+
QScrollBar::handle:vertical:hover {{
|
|
734
|
+
background-color: {hover_scrollbar_handle_background_color};
|
|
735
|
+
border: {hover_scrollbar_handle_border_width}px solid {hover_scrollbar_handle_border_color};
|
|
736
|
+
}}
|
|
737
|
+
QScrollBar::handle:vertical:pressed {{
|
|
738
|
+
background-color: {pressed_scrollbar_handle_background_color};
|
|
739
|
+
border: {pressed_scrollbar_handle_border_width}px solid {pressed_scrollbar_handle_border_color};
|
|
740
|
+
}}
|
|
741
|
+
"""
|
|
742
|
+
list_table.setStyleSheet(style_sheet)
|
|
743
|
+
list_table.setRowCount(len(items_data))
|
|
744
|
+
for row, item_data in enumerate(items_data):
|
|
745
|
+
items = row_populator_function(item_data)
|
|
746
|
+
for item in items:
|
|
747
|
+
item.setTextAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
748
|
+
for column, item in enumerate(items):
|
|
749
|
+
list_table.setItem(row, column, item)
|
|
750
|
+
return list_table
|
|
751
|
+
|
|
634
752
|
def confirm_exit(
|
|
635
753
|
window,
|
|
636
754
|
background_color = "#1e1e1e",
|
|
@@ -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
|
|
Binary file
|
|
Binary file
|
|
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
|