Skip to content

Commit 0eea553

Browse files
authored
SG-9210: [minor] Button width fix due to issues in Houdini 17. (#71)
Sets some button min widths to combat styling issues in Houdini 17.
1 parent a591705 commit 0eea553

10 files changed

+61
-21
lines changed

hooks/tk-houdini_actions.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,16 @@ def _merge(self, path, sg_publish_data):
163163

164164
# use the default settings, which tries to merge all nodes
165165
# and is conservative about overwriting and errors
166-
167-
hou.hipFile.merge(path,
168-
node_pattern="*",
169-
overwrite_on_conflict=False,
170-
ignore_load_warnings=False)
166+
#
167+
# NOTE: We're ensuring that the path uses forward-slash separators
168+
# since some hearly H17 builds had major issues with backslashes on
169+
# Windows.
170+
hou.hipFile.merge(
171+
path.replace(os.path.sep, "/"),
172+
node_pattern="*",
173+
overwrite_on_conflict=False,
174+
ignore_load_warnings=False,
175+
)
171176

172177

173178
##############################################################################################################

python/tk_multi_loader/ui/dialog.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Ui_Dialog(object):
1212
def setupUi(self, Dialog):
1313
Dialog.setObjectName("Dialog")
14-
Dialog.resize(1226, 766)
14+
Dialog.resize(1226, 782)
1515
self.horizontalLayout_3 = QtGui.QHBoxLayout(Dialog)
1616
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
1717
self.left_area = QtGui.QVBoxLayout()
@@ -131,6 +131,7 @@ def setupUi(self, Dialog):
131131
sizePolicy.setVerticalStretch(0)
132132
sizePolicy.setHeightForWidth(self.check_all.sizePolicy().hasHeightForWidth())
133133
self.check_all.setSizePolicy(sizePolicy)
134+
self.check_all.setMinimumSize(QtCore.QSize(60, 26))
134135
self.check_all.setObjectName("check_all")
135136
self.horizontalLayout_6.addWidget(self.check_all)
136137
self.check_none = QtGui.QToolButton(Dialog)
@@ -139,6 +140,7 @@ def setupUi(self, Dialog):
139140
sizePolicy.setVerticalStretch(0)
140141
sizePolicy.setHeightForWidth(self.check_none.sizePolicy().hasHeightForWidth())
141142
self.check_none.setSizePolicy(sizePolicy)
143+
self.check_none.setMinimumSize(QtCore.QSize(75, 26))
142144
self.check_none.setObjectName("check_none")
143145
self.horizontalLayout_6.addWidget(self.check_none)
144146
self.label_3 = QtGui.QLabel(Dialog)
@@ -183,7 +185,7 @@ def setupUi(self, Dialog):
183185
self.thumbnail_mode.setObjectName("thumbnail_mode")
184186
self.horizontalLayout_2.addWidget(self.thumbnail_mode)
185187
self.list_mode = QtGui.QToolButton(Dialog)
186-
self.list_mode.setMinimumSize(QtCore.QSize(0, 26))
188+
self.list_mode.setMinimumSize(QtCore.QSize(26, 26))
187189
icon2 = QtGui.QIcon()
188190
icon2.addPixmap(QtGui.QPixmap(":/res/mode_switch_card.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
189191
self.list_mode.setIcon(icon2)
@@ -205,7 +207,7 @@ def setupUi(self, Dialog):
205207
self.search_publishes.setObjectName("search_publishes")
206208
self.horizontalLayout_2.addWidget(self.search_publishes)
207209
self.info = QtGui.QToolButton(Dialog)
208-
self.info.setMinimumSize(QtCore.QSize(0, 26))
210+
self.info.setMinimumSize(QtCore.QSize(80, 26))
209211
self.info.setObjectName("info")
210212
self.horizontalLayout_2.addWidget(self.info)
211213
self.middle_area.addLayout(self.horizontalLayout_2)

python/tk_multi_loader/ui/resources_rc.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

python/tk_multi_loader/ui/widget_publish_history.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Ui_PublishHistoryWidget(object):
1212
def setupUi(self, PublishHistoryWidget):
1313
PublishHistoryWidget.setObjectName("PublishHistoryWidget")
14-
PublishHistoryWidget.resize(394, 93)
14+
PublishHistoryWidget.resize(1226, 782)
1515
self.horizontalLayout_3 = QtGui.QHBoxLayout(PublishHistoryWidget)
1616
self.horizontalLayout_3.setSpacing(1)
1717
self.horizontalLayout_3.setContentsMargins(1, 1, 1, 1)
@@ -45,6 +45,7 @@ def setupUi(self, PublishHistoryWidget):
4545
self.header_label.setObjectName("header_label")
4646
self.horizontalLayout.addWidget(self.header_label)
4747
self.button = QtGui.QToolButton(self.box)
48+
self.button.setMinimumSize(QtCore.QSize(50, 0))
4849
self.button.setPopupMode(QtGui.QToolButton.InstantPopup)
4950
self.button.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)
5051
self.button.setObjectName("button")

python/tk_multi_loader/ui/widget_publish_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Ui_PublishListWidget(object):
1212
def setupUi(self, PublishListWidget):
1313
PublishListWidget.setObjectName("PublishListWidget")
14-
PublishListWidget.resize(352, 48)
14+
PublishListWidget.resize(1226, 782)
1515
self.horizontalLayout_3 = QtGui.QHBoxLayout(PublishListWidget)
1616
self.horizontalLayout_3.setSpacing(1)
1717
self.horizontalLayout_3.setContentsMargins(1, 1, 1, 1)
@@ -63,6 +63,7 @@ def setupUi(self, PublishListWidget):
6363
self.verticalLayout.addItem(spacerItem1)
6464
self.horizontalLayout.addLayout(self.verticalLayout)
6565
self.button = QtGui.QToolButton(self.box)
66+
self.button.setMinimumSize(QtCore.QSize(50, 0))
6667
self.button.setPopupMode(QtGui.QToolButton.InstantPopup)
6768
self.button.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)
6869
self.button.setObjectName("button")

python/tk_multi_loader/ui/widget_publish_thumb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Ui_PublishThumbWidget(object):
1212
def setupUi(self, PublishThumbWidget):
1313
PublishThumbWidget.setObjectName("PublishThumbWidget")
14-
PublishThumbWidget.resize(520, 443)
14+
PublishThumbWidget.resize(1226, 782)
1515
self.verticalLayout_2 = QtGui.QVBoxLayout(PublishThumbWidget)
1616
self.verticalLayout_2.setSpacing(1)
1717
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
@@ -40,6 +40,7 @@ def setupUi(self, PublishThumbWidget):
4040
self.label.setObjectName("label")
4141
self.horizontalLayout.addWidget(self.label)
4242
self.button = QtGui.QToolButton(self.box)
43+
self.button.setMinimumSize(QtCore.QSize(50, 0))
4344
self.button.setPopupMode(QtGui.QToolButton.InstantPopup)
4445
self.button.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)
4546
self.button.setObjectName("button")

resources/dialog.ui

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>1226</width>
10-
<height>766</height>
10+
<height>782</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -229,6 +229,12 @@ background-image: url(:/res/right_arrow_pressed.png);
229229
<verstretch>0</verstretch>
230230
</sizepolicy>
231231
</property>
232+
<property name="minimumSize">
233+
<size>
234+
<width>60</width>
235+
<height>26</height>
236+
</size>
237+
</property>
232238
<property name="text">
233239
<string>Select All</string>
234240
</property>
@@ -242,6 +248,12 @@ background-image: url(:/res/right_arrow_pressed.png);
242248
<verstretch>0</verstretch>
243249
</sizepolicy>
244250
</property>
251+
<property name="minimumSize">
252+
<size>
253+
<width>75</width>
254+
<height>26</height>
255+
</size>
256+
</property>
245257
<property name="text">
246258
<string>Select None</string>
247259
</property>
@@ -356,7 +368,7 @@ background-image: url(:/res/right_arrow_pressed.png);
356368
<widget class="QToolButton" name="list_mode">
357369
<property name="minimumSize">
358370
<size>
359-
<width>0</width>
371+
<width>26</width>
360372
<height>26</height>
361373
</size>
362374
</property>
@@ -418,7 +430,7 @@ background-image: url(:/res/right_arrow_pressed.png);
418430
<widget class="QToolButton" name="info">
419431
<property name="minimumSize">
420432
<size>
421-
<width>0</width>
433+
<width>80</width>
422434
<height>26</height>
423435
</size>
424436
</property>

resources/widget_publish_history.ui

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>394</width>
10-
<height>93</height>
9+
<width>1226</width>
10+
<height>782</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -88,6 +88,12 @@
8888
</item>
8989
<item>
9090
<widget class="QToolButton" name="button">
91+
<property name="minimumSize">
92+
<size>
93+
<width>50</width>
94+
<height>0</height>
95+
</size>
96+
</property>
9197
<property name="text">
9298
<string>Actions</string>
9399
</property>

resources/widget_publish_list.ui

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>352</width>
10-
<height>48</height>
9+
<width>1226</width>
10+
<height>782</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -148,6 +148,12 @@
148148
</item>
149149
<item>
150150
<widget class="QToolButton" name="button">
151+
<property name="minimumSize">
152+
<size>
153+
<width>50</width>
154+
<height>0</height>
155+
</size>
156+
</property>
151157
<property name="text">
152158
<string>Actions</string>
153159
</property>

resources/widget_publish_thumb.ui

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>520</width>
10-
<height>443</height>
9+
<width>1226</width>
10+
<height>782</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -78,6 +78,12 @@ Foo</string>
7878
</item>
7979
<item>
8080
<widget class="QToolButton" name="button">
81+
<property name="minimumSize">
82+
<size>
83+
<width>50</width>
84+
<height>0</height>
85+
</size>
86+
</property>
8187
<property name="text">
8288
<string>Actions</string>
8389
</property>

0 commit comments

Comments
 (0)