From 30b854128ebaed681d7a84a2da014327cbc418d2 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 13 Mar 2024 12:29:47 +0100 Subject: [PATCH 1/2] change scrollbar stylesheet to avoid issues --- client/ayon_core/style/style.css | 32 +++++++++++++++++++ .../tools/publisher/widgets/report_page.py | 2 ++ 2 files changed, 34 insertions(+) diff --git a/client/ayon_core/style/style.css b/client/ayon_core/style/style.css index fcc76b0bff..607fd1fa31 100644 --- a/client/ayon_core/style/style.css +++ b/client/ayon_core/style/style.css @@ -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; diff --git a/client/ayon_core/tools/publisher/widgets/report_page.py b/client/ayon_core/tools/publisher/widgets/report_page.py index 1bbe8033f9..9d16fb67b2 100644 --- a/client/ayon_core/tools/publisher/widgets/report_page.py +++ b/client/ayon_core/tools/publisher/widgets/report_page.py @@ -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() From 242b38b3d9b55e08537db75d07b55195b7efce24 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 13 Mar 2024 14:38:24 +0100 Subject: [PATCH 2/2] add margin to left to offset content from scroll bar --- client/ayon_core/tools/publisher/widgets/report_page.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/tools/publisher/widgets/report_page.py b/client/ayon_core/tools/publisher/widgets/report_page.py index 9d16fb67b2..7475b39f52 100644 --- a/client/ayon_core/tools/publisher/widgets/report_page.py +++ b/client/ayon_core/tools/publisher/widgets/report_page.py @@ -502,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)