From f8cd0f9b1a3df871b3b00029bc84c01385368e04 Mon Sep 17 00:00:00 2001 From: Kern Attila Germain <5556461+KernAttila@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:29:49 +0200 Subject: [PATCH 1/4] feat!: Group all job specific widgets in a groupBox with title --- cuesubmit/cuesubmit/ui/SettingsWidgets.py | 26 ++++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/cuesubmit/cuesubmit/ui/SettingsWidgets.py b/cuesubmit/cuesubmit/ui/SettingsWidgets.py index 01601265a..33f36dda0 100644 --- a/cuesubmit/cuesubmit/ui/SettingsWidgets.py +++ b/cuesubmit/cuesubmit/ui/SettingsWidgets.py @@ -35,6 +35,11 @@ class BaseSettingsWidget(QtWidgets.QWidget): def __init__(self, parent=None): super(BaseSettingsWidget, self).__init__(parent) self.mainLayout = QtWidgets.QVBoxLayout() + self.groupBox = QtWidgets.QGroupBox('options') + self.groupLayout = QtWidgets.QVBoxLayout() + self.groupBox.setLayout(self.groupLayout) + self.groupBox.setStyleSheet(Widgets.Style.GROUP_BOX) + self.mainLayout.addWidget(self.groupBox) self.setLayout(self.mainLayout) self.mainLayout.setContentsMargins(0, 0, 0, 0) @@ -53,6 +58,7 @@ class InMayaSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, cameras=None, filename=None, parent=None, *args, **kwargs): super(InMayaSettings, self).__init__(parent=parent) + self.groupBox.setTitle('Maya options') self.mayaFileInput = Widgets.CueLabelLineEdit('Maya File:', filename) self.cameraSelector = Widgets.CueSelectPulldown('Render Cameras', options=cameras) self.selectorLayout = QtWidgets.QHBoxLayout() @@ -60,7 +66,7 @@ def __init__(self, cameras=None, filename=None, parent=None, *args, **kwargs): def setupUi(self): """Creates the Maya-specific widget layout.""" - self.mainLayout.addWidget(self.mayaFileInput) + self.groupLayout.addWidget(self.mayaFileInput) self.selectorLayout.addWidget(self.cameraSelector) self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL)) self.mainLayout.addLayout(self.selectorLayout) @@ -82,13 +88,14 @@ class BaseMayaSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, parent=None, *args, **kwargs): super(BaseMayaSettings, self).__init__(parent=parent) + self.groupBox.setTitle('Maya options') self.mayaFileInput = Widgets.CueLabelLineEdit('Maya File:') self.setupUi() self.setupConnections() def setupUi(self): """Creates the widget layout with a single input for the path to the Maya scene.""" - self.mainLayout.addWidget(self.mayaFileInput) + self.groupLayout.addWidget(self.mayaFileInput) def setupConnections(self): """Sets up widget signals.""" @@ -109,6 +116,7 @@ class InNukeSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, writeNodes=None, filename=None, parent=None, *args, **kwargs): super(InNukeSettings, self).__init__(parent=parent) + self.groupBox.setTitle('Nuke options') self.fileInput = Widgets.CueLabelLineEdit('Nuke File:', filename) self.writeNodeSelector = Widgets.CueSelectPulldown('Write Nodes:', emptyText='[All]', options=writeNodes) @@ -117,7 +125,7 @@ def __init__(self, writeNodes=None, filename=None, parent=None, *args, **kwargs) def setupUi(self): """Creates the Nuke-specific widget layout.""" - self.mainLayout.addWidget(self.fileInput) + self.groupLayout.addWidget(self.fileInput) self.selectorLayout.addWidget(self.writeNodeSelector) self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL)) self.mainLayout.addLayout(self.selectorLayout) @@ -139,13 +147,14 @@ class BaseNukeSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, parent=None, *args, **kwargs): super(BaseNukeSettings, self).__init__(parent=parent) + self.groupBox.setTitle('Nuke options') self.fileInput = Widgets.CueLabelLineEdit('Nuke File:') self.setupUi() self.setupConnections() def setupUi(self): """Creates the widget layout with a single input for the path to the Nuke script.""" - self.mainLayout.addWidget(self.fileInput) + self.groupLayout.addWidget(self.fileInput) def setupConnections(self): """Sets up widget signals.""" @@ -166,7 +175,7 @@ class ShellSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, parent=None, *args, **kwargs): super(ShellSettings, self).__init__(parent=parent) - + self.groupBox.setTitle('Shell options') self.commandTextBox = Command.CueCommandWidget() self.setupUi() @@ -174,7 +183,7 @@ def __init__(self, parent=None, *args, **kwargs): def setupUi(self): """Creates the widget layout with a single input for the shell command.""" - self.mainLayout.addWidget(self.commandTextBox) + self.groupLayout.addWidget(self.commandTextBox) def setupConnections(self): """Sets up widget signals.""" @@ -193,6 +202,7 @@ class BaseBlenderSettings(BaseSettingsWidget): # pylint: disable=keyword-arg-before-vararg,unused-argument def __init__(self, parent=None, *args, **kwargs): super(BaseBlenderSettings, self).__init__(parent=parent) + self.groupBox.setTitle('Blender options') self.fileInput = Widgets.CueLabelLineEdit('Blender File:') self.outputPath = Widgets.CueLabelLineEdit( 'Output Path (Optional):', @@ -207,8 +217,8 @@ def __init__(self, parent=None, *args, **kwargs): def setupUi(self): """Creates the Blender-specific widget layout.""" - self.mainLayout.addWidget(self.fileInput) - self.mainLayout.addLayout(self.outputLayout) + self.groupLayout.addWidget(self.fileInput) + self.groupLayout.addLayout(self.outputLayout) self.outputLayout.addWidget(self.outputPath) self.outputLayout.addWidget(self.outputSelector) From 088c84ba7783d1fe7e2d2ea1f411a0510e207e54 Mon Sep 17 00:00:00 2001 From: Kern Attila Germain <5556461+KernAttila@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:32:23 +0200 Subject: [PATCH 2/4] feat: moved job specific widget group below job setup widgets --- cuesubmit/cuesubmit/ui/Submit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cuesubmit/cuesubmit/ui/Submit.py b/cuesubmit/cuesubmit/ui/Submit.py index 1e0246d17..3e5d0385b 100644 --- a/cuesubmit/cuesubmit/ui/Submit.py +++ b/cuesubmit/cuesubmit/ui/Submit.py @@ -264,8 +264,6 @@ def setupUi(self): self.scrollingLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL)) self.scrollingLayout.addWidget(Widgets.CueLabelLine('Layer Info')) self.layerInfoLayout.addWidget(self.layerNameInput) - self.settingsLayout.addWidget(self.settingsWidget) - self.layerInfoLayout.addLayout(self.settingsLayout) self.layerInfoLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL)) self.layerInfoLayout.addWidget(self.frameBox) @@ -282,6 +280,9 @@ def setupUi(self): self.layerInfoLayout.addLayout(self.coresLayout) self.scrollingLayout.addLayout(self.layerInfoLayout) + self.settingsLayout.addWidget(self.settingsWidget) + self.layerInfoLayout.addLayout(self.settingsLayout) + self.scrollingLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL)) self.scrollingLayout.addWidget(Widgets.CueLabelLine('Submission Details')) From b4085a28e224125b79afaf84d133ca08f0d46916 Mon Sep 17 00:00:00 2001 From: Kern Attila Germain <5556461+KernAttila@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:39:57 +0200 Subject: [PATCH 3/4] feat: add styling for QGroupBox --- cuesubmit/cuesubmit/ui/Style.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cuesubmit/cuesubmit/ui/Style.py b/cuesubmit/cuesubmit/ui/Style.py index 6e3211b94..bfd26c549 100644 --- a/cuesubmit/cuesubmit/ui/Style.py +++ b/cuesubmit/cuesubmit/ui/Style.py @@ -173,6 +173,14 @@ } """ +GROUP_BOX = """ +QGroupBox { + border: 3px solid rgb(30, 40, 50); + border-radius: 6px; + font-size: 8pt; +} +""" + SEPARATOR_LINE = 'border: 1px solid rgb(20, 30, 40)' TEXT = 'background-color: rgb(40, 50, 60); color: rgb(250, 250, 250); font-weight: regular;' From 425d7faf720e0eafa019277bccb2b085a3c4e39a Mon Sep 17 00:00:00 2001 From: Kern Attila Germain <5556461+KernAttila@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:53:06 +0200 Subject: [PATCH 4/4] fix: update layout var --- cuesubmit/cuesubmit/ui/SettingsWidgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuesubmit/cuesubmit/ui/SettingsWidgets.py b/cuesubmit/cuesubmit/ui/SettingsWidgets.py index 33f36dda0..a46444ad7 100644 --- a/cuesubmit/cuesubmit/ui/SettingsWidgets.py +++ b/cuesubmit/cuesubmit/ui/SettingsWidgets.py @@ -69,7 +69,7 @@ def setupUi(self): self.groupLayout.addWidget(self.mayaFileInput) self.selectorLayout.addWidget(self.cameraSelector) self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL)) - self.mainLayout.addLayout(self.selectorLayout) + self.groupLayout.addLayout(self.selectorLayout) def setCommandData(self, commandData): self.mayaFileInput.setText(commandData.get('mayaFile', '')) @@ -128,7 +128,7 @@ def setupUi(self): self.groupLayout.addWidget(self.fileInput) self.selectorLayout.addWidget(self.writeNodeSelector) self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL)) - self.mainLayout.addLayout(self.selectorLayout) + self.groupLayout.addLayout(self.selectorLayout) def setCommandData(self, commandData): self.fileInput.setText(commandData.get('nukeFile', ''))