Skip to content

Commit

Permalink
PICARD-2791: Prevent panes of options window being fully collapsible
Browse files Browse the repository at this point in the history
Prevents users accidentally hiding a pane without knowing how to get it back.
  • Loading branch information
phw committed Dec 16, 2023
1 parent 489267c commit 983de26
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
13 changes: 8 additions & 5 deletions picard/ui/ui_options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'ui/options.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
# Created by: PyQt6 UI code generator 6.6.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -17,25 +17,28 @@ def setupUi(self, Dialog):
self.vboxlayout.setContentsMargins(9, 9, 9, 9)
self.vboxlayout.setSpacing(6)
self.vboxlayout.setObjectName("vboxlayout")
self.dialog_splitter = QtWidgets.QSplitter(Dialog)
self.dialog_splitter = QtWidgets.QSplitter(parent=Dialog)
self.dialog_splitter.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.dialog_splitter.setChildrenCollapsible(False)
self.dialog_splitter.setObjectName("dialog_splitter")
self.pages_tree = QtWidgets.QTreeWidget(self.dialog_splitter)
self.pages_tree = QtWidgets.QTreeWidget(parent=self.dialog_splitter)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Ignored, QtWidgets.QSizePolicy.Policy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pages_tree.sizePolicy().hasHeightForWidth())
self.pages_tree.setSizePolicy(sizePolicy)
self.pages_tree.setMinimumSize(QtCore.QSize(140, 0))
self.pages_tree.setObjectName("pages_tree")
self.pages_stack = QtWidgets.QStackedWidget(self.dialog_splitter)
self.pages_stack = QtWidgets.QStackedWidget(parent=self.dialog_splitter)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Ignored, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pages_stack.sizePolicy().hasHeightForWidth())
self.pages_stack.setSizePolicy(sizePolicy)
self.pages_stack.setMinimumSize(QtCore.QSize(280, 0))
self.pages_stack.setObjectName("pages_stack")
self.vboxlayout.addWidget(self.dialog_splitter)
self.buttonbox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonbox = QtWidgets.QDialogButtonBox(parent=Dialog)
self.buttonbox.setMinimumSize(QtCore.QSize(0, 0))
self.buttonbox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonbox.setObjectName("buttonbox")
Expand Down
15 changes: 15 additions & 0 deletions ui/options.ui
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,22 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QTreeWidget" name="pages_tree">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<column>
<property name="text">
<string/>
Expand All @@ -54,6 +63,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>280</width>
<height>0</height>
</size>
</property>
</widget>
</widget>
</item>
Expand Down

0 comments on commit 983de26

Please sign in to comment.