Skip to content

Commit

Permalink
Merge pull request #177 from ynput/bugfix/AY-1044_Publisher-window-st…
Browse files Browse the repository at this point in the history
…retch-on-error

Publisher: Change scrollbar stylesheet to avoid issues on resize
  • Loading branch information
iLLiCiTiT authored Mar 13, 2024
2 parents fc357fc + 242b38b commit da6910f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
32 changes: 32 additions & 0 deletions client/ayon_core/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,38 @@ PixmapButton:disabled {
font-size: 13pt;
}

#PublisherVerticalScrollArea QScrollBar {
background: transparent;
margin: 0;
border: none;
}

#PublisherVerticalScrollArea QScrollBar:horizontal {
height: 10px;
margin: 0;
}

#PublisherVerticalScrollArea QScrollBar:vertical {
width: 10px;
margin: 0;
}

#PublisherVerticalScrollArea QScrollBar::handle {
background: {color:bg-scroll-handle};
border-radius: 4px;
margin: 1px;
}

#PublisherVerticalScrollArea QScrollBar::handle:horizontal {
min-width: 20px;
min-height: 8px;
}

#PublisherVerticalScrollArea QScrollBar::handle:vertical {
min-height: 20px;
min-width: 8px;
}

ValidationArtistMessage QLabel {
font-size: 20pt;
font-weight: bold;
Expand Down
6 changes: 5 additions & 1 deletion client/ayon_core/tools/publisher/widgets/report_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def __init__(self, *args, **kwargs):
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
self.setLayoutDirection(QtCore.Qt.RightToLeft)

self.setObjectName("PublisherVerticalScrollArea")

self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
# Background of scrollbar will be transparent
scrollbar_bg = self.verticalScrollBar().parent()
Expand Down Expand Up @@ -500,7 +502,9 @@ def __init__(self, parent):
errors_scroll.setWidget(errors_widget)

errors_layout = QtWidgets.QVBoxLayout(errors_widget)
errors_layout.setContentsMargins(0, 0, 0, 0)
# Add 5 margin to left so the is not directly on the edge of the
# scroll widget
errors_layout.setContentsMargins(5, 0, 0, 0)

layout = QtWidgets.QVBoxLayout(self)
layout.addWidget(errors_scroll, 1)
Expand Down

0 comments on commit da6910f

Please sign in to comment.