diff --git a/openpype/style/style.css b/openpype/style/style.css index 576a0008eb..7db3558c14 100644 --- a/openpype/style/style.css +++ b/openpype/style/style.css @@ -72,6 +72,14 @@ QPushButton:disabled { background: {color:bg-buttons-disabled}; } +QPushButton::menu-indicator { + subcontrol-origin: padding; + subcontrol-position: right; + width: 8px; + height: 8px; + padding-right: 5px; +} + QToolButton { border: none; background: transparent; @@ -164,6 +172,15 @@ QComboBox::down-arrow, QComboBox::down-arrow:on, QComboBox::down-arrow:hover, QC image: url(:/openpype/images/combobox_arrow.png); } +/* Splitter */ +QSplitter { + border: none; +} + +QSplitter::handle { + border: 1px dotted {color:bg-menu-separator}; +} + /* SLider */ QSlider::groove { border: 1px solid #464b54; @@ -542,3 +559,17 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { #IconView[mode="icon"]::icon { top: 3px; } + +/* Standalone publisher */ +#ComponentList { + outline: none; +} + +#ComponentItem { + background: transparent; +} + +#ComponentFrame { + border: 1px solid {color:border}; + border-radius: 0.1em; +} diff --git a/openpype/tools/standalonepublish/app.py b/openpype/tools/standalonepublish/app.py index 7d25a8ca55..169abe530a 100644 --- a/openpype/tools/standalonepublish/app.py +++ b/openpype/tools/standalonepublish/app.py @@ -10,7 +10,7 @@ from .widgets import ( AssetWidget, FamilyWidget, ComponentsWidget, ShadowWidget ) from .widgets.constants import HOST_NAME -from avalon import style +from openpype import style from openpype.api import resources from avalon.api import AvalonMongoDB from openpype.modules import ModulesManager @@ -22,7 +22,6 @@ class Window(QtWidgets.QDialog): :param parent: Main widget that cares about all GUIs :type parent: QtWidgets.QMainWindow """ - _db = AvalonMongoDB() _jobs = {} valid_family = False valid_components = False @@ -32,6 +31,7 @@ class Window(QtWidgets.QDialog): def __init__(self, pyblish_paths, parent=None): super(Window, self).__init__(parent=parent) + self._db = AvalonMongoDB() self._db.install() self.pyblish_paths = pyblish_paths diff --git a/openpype/tools/standalonepublish/widgets/widget_component_item.py b/openpype/tools/standalonepublish/widgets/widget_component_item.py index 3850d68b96..186c8024db 100644 --- a/openpype/tools/standalonepublish/widgets/widget_component_item.py +++ b/openpype/tools/standalonepublish/widgets/widget_component_item.py @@ -16,6 +16,9 @@ class ComponentItem(QtWidgets.QFrame): def __init__(self, parent, main_parent): super().__init__() + + self.setObjectName("ComponentItem") + self.has_valid_repre = True self.actions = [] self.resize(290, 70) @@ -32,6 +35,7 @@ class ComponentItem(QtWidgets.QFrame): # Main widgets frame = QtWidgets.QFrame(self) + frame.setObjectName("ComponentFrame") frame.setFrameShape(QtWidgets.QFrame.StyledPanel) frame.setFrameShadow(QtWidgets.QFrame.Raised) diff --git a/openpype/tools/standalonepublish/widgets/widget_components_list.py b/openpype/tools/standalonepublish/widgets/widget_components_list.py index 4e502a2e5f..0ee90ae4de 100644 --- a/openpype/tools/standalonepublish/widgets/widget_components_list.py +++ b/openpype/tools/standalonepublish/widgets/widget_components_list.py @@ -5,6 +5,8 @@ class ComponentsList(QtWidgets.QTableWidget): def __init__(self, parent=None): super().__init__(parent=parent) + self.setObjectName("ComponentList") + self._main_column = 0 self.setColumnCount(1) diff --git a/openpype/tools/standalonepublish/widgets/widget_drop_empty.py b/openpype/tools/standalonepublish/widgets/widget_drop_empty.py index ed526f2a78..a890f38426 100644 --- a/openpype/tools/standalonepublish/widgets/widget_drop_empty.py +++ b/openpype/tools/standalonepublish/widgets/widget_drop_empty.py @@ -21,16 +21,12 @@ class DropEmpty(QtWidgets.QWidget): self._label = QtWidgets.QLabel('Drag & Drop') self._label.setFont(font) - self._label.setStyleSheet( - 'background-color: transparent;' - ) + self._label.setAttribute(QtCore.Qt.WA_TranslucentBackground) font.setPointSize(12) self._sub_label = QtWidgets.QLabel('(drop files here)') self._sub_label.setFont(font) - self._sub_label.setStyleSheet( - 'background-color: transparent;' - ) + self._sub_label.setAttribute(QtCore.Qt.WA_TranslucentBackground) layout.addWidget(self._label, alignment=BottomCenterAlignment) layout.addWidget(self._sub_label, alignment=TopCenterAlignment) diff --git a/openpype/tools/standalonepublish/widgets/widget_family.py b/openpype/tools/standalonepublish/widgets/widget_family.py index 86663c8ee0..682a6fc974 100644 --- a/openpype/tools/standalonepublish/widgets/widget_family.py +++ b/openpype/tools/standalonepublish/widgets/widget_family.py @@ -37,28 +37,26 @@ class FamilyWidget(QtWidgets.QWidget): input_subset = QtWidgets.QLineEdit() input_result = QtWidgets.QLineEdit() - input_result.setStyleSheet("color: #BBBBBB;") input_result.setEnabled(False) # region Menu for default subset names btn_subset = QtWidgets.QPushButton() btn_subset.setFixedWidth(18) - btn_subset.setFixedHeight(20) menu_subset = QtWidgets.QMenu(btn_subset) btn_subset.setMenu(menu_subset) # endregion name_layout = QtWidgets.QHBoxLayout() - name_layout.addWidget(input_subset) - name_layout.addWidget(btn_subset) + name_layout.addWidget(input_subset, 1) + name_layout.addWidget(btn_subset, 0) name_layout.setContentsMargins(0, 0, 0, 0) # version version_spinbox = QtWidgets.QSpinBox() + version_spinbox.setButtonSymbols(QtWidgets.QSpinBox.NoButtons) version_spinbox.setMinimum(1) version_spinbox.setMaximum(9999) version_spinbox.setEnabled(False) - version_spinbox.setStyleSheet("color: #BBBBBB;") version_checkbox = QtWidgets.QCheckBox("Next Available Version") version_checkbox.setCheckState(QtCore.Qt.CheckState(2))