gui-utilities 1.1.0__py3-none-any.whl → 1.1.1__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.
- gui_utilities/gui_utilities.py +26 -4
- {gui_utilities-1.1.0.dist-info → gui_utilities-1.1.1.dist-info}/METADATA +1 -1
- {gui_utilities-1.1.0.dist-info → gui_utilities-1.1.1.dist-info}/RECORD +6 -6
- {gui_utilities-1.1.0.dist-info → gui_utilities-1.1.1.dist-info}/WHEEL +0 -0
- {gui_utilities-1.1.0.dist-info → gui_utilities-1.1.1.dist-info}/licenses/LICENSE +0 -0
- {gui_utilities-1.1.0.dist-info → gui_utilities-1.1.1.dist-info}/top_level.txt +0 -0
gui_utilities/gui_utilities.py
CHANGED
|
@@ -69,10 +69,10 @@ def create_form(
|
|
|
69
69
|
button = create_button(**button_properties_copy)
|
|
70
70
|
if callback: button.clicked.connect(callback)
|
|
71
71
|
menu_layout.addWidget(button)
|
|
72
|
-
ui_instance.
|
|
73
|
-
ui_instance.
|
|
74
|
-
body_layout.addWidget(ui_instance.
|
|
75
|
-
ui_instance.
|
|
72
|
+
ui_instance.content_widget = QWidget()
|
|
73
|
+
ui_instance.content_widget.setLayout(QVBoxLayout())
|
|
74
|
+
body_layout.addWidget(ui_instance.content_widget)
|
|
75
|
+
ui_instance.content_widget.setStyleSheet("background-color: #333333;")
|
|
76
76
|
body_layout.setStretch(0, 1)
|
|
77
77
|
body_layout.setStretch(1, 4)
|
|
78
78
|
return main_layout
|
|
@@ -641,6 +641,28 @@ def switch_instance(gui_instance, menu_function):
|
|
|
641
641
|
else: gui_instance.window.layout().addWidget(new_widget)
|
|
642
642
|
gui_instance.central_widget = new_widget
|
|
643
643
|
|
|
644
|
+
def switch_content_widget(content_widget):
|
|
645
|
+
def clear_layout(layout):
|
|
646
|
+
if layout is not None:
|
|
647
|
+
while layout.count():
|
|
648
|
+
item = layout.takeAt(0)
|
|
649
|
+
widget = item.widget()
|
|
650
|
+
child_layout = item.layout()
|
|
651
|
+
if widget is not None:
|
|
652
|
+
widget.setParent(None)
|
|
653
|
+
widget.deleteLater()
|
|
654
|
+
elif child_layout is not None:
|
|
655
|
+
clear_layout(child_layout)
|
|
656
|
+
child_layout.setParent(None)
|
|
657
|
+
|
|
658
|
+
if content_widget.layout() is not None: clear_layout(content_widget.layout())
|
|
659
|
+
for child in content_widget.findChildren(QWidget):
|
|
660
|
+
if child.parent() == content_widget: child.deleteLater()
|
|
661
|
+
main_layout = content_widget.layout()
|
|
662
|
+
main_layout.setContentsMargins(25, 25, 25, 25)
|
|
663
|
+
main_layout.setSpacing(10)
|
|
664
|
+
return main_layout
|
|
665
|
+
|
|
644
666
|
def get_responsive_width(window, fraction = 3.0):
|
|
645
667
|
screen_width = window.screen().size().width()
|
|
646
668
|
return round(screen_width / fraction)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
gui_utilities/gui_utilities.py,sha256=
|
|
1
|
+
gui_utilities/gui_utilities.py,sha256=Xen9VtYTFU3qa51dVeJ5wcTD--ylrXqMzo9VwqJL4mw,29060
|
|
2
2
|
gui_utilities/icons/focused_hide_text_icon.png,sha256=0Ysx7vC-mEVfuSBWx1Zw-UhpqvrTCcIvnQ926wFmuK4,13084
|
|
3
3
|
gui_utilities/icons/focused_show_text_icon.png,sha256=gmZU7RR4FN-9VSzpD00ZkQ8UGbihO2y808Kh3b_TaEg,6739
|
|
4
4
|
gui_utilities/icons/hide_text_icon.png,sha256=f5jq6KaAygWNjzP_Ah6dw6eu8q5ml3m56JTeNSTSgEU,7207
|
|
5
5
|
gui_utilities/icons/show_text_icon.png,sha256=8Vdp2XickPEM-eTb1-qBXf3qmHldSzllMZZfObir9p8,5376
|
|
6
6
|
gui_utilities/tlds/tlds_list.txt,sha256=wIWmAQGVNsY0ZJy7qPW8kItDTCE4PTq8wcUhC2hpjkw,10916
|
|
7
|
-
gui_utilities-1.1.
|
|
8
|
-
gui_utilities-1.1.
|
|
9
|
-
gui_utilities-1.1.
|
|
10
|
-
gui_utilities-1.1.
|
|
11
|
-
gui_utilities-1.1.
|
|
7
|
+
gui_utilities-1.1.1.dist-info/licenses/LICENSE,sha256=NNoMFs43kWl1J-aqq7_EsPlBjL5XTccWjZlwrlCR-Xc,1093
|
|
8
|
+
gui_utilities-1.1.1.dist-info/METADATA,sha256=omiLAkai1o4LGcfVTuobxwrEBAzhW0iHSZalIZwFWj8,265
|
|
9
|
+
gui_utilities-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
gui_utilities-1.1.1.dist-info/top_level.txt,sha256=c4C84nMT41keiX9b1AJJZDBU3kA38c7vOmP9kDie8Lk,14
|
|
11
|
+
gui_utilities-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|