diff --git a/NUSGet.py b/NUSGet.py index e9ca7c9..d6a19f4 100644 --- a/NUSGet.py +++ b/NUSGet.py @@ -142,6 +142,14 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.trees[tree].doubleClicked.connect(self.title_double_clicked) self.trees[tree].expanded.connect(lambda: self.resize_tree(self.ui.platform_tabs.currentIndex())) self.trees[tree].collapsed.connect(lambda: self.resize_tree(self.ui.platform_tabs.currentIndex())) + # This stylesheet patch allows me to add the correct padding above the scrollbar so that it doesn't overlap + # the QTreeView's header. + self.trees[tree].setStyleSheet(self.trees[tree].styleSheet() + f""" + QTreeView QScrollBar::sub-line:vertical {{ + border: 0; + background: #2b2b2b; + height: {self.trees[tree].header().sizeHint().height()}px; + }}""") # Prevent resizing. self.setFixedSize(self.size()) # These connections allow for clicking the checkbox labels to toggle the checkboxes, if they're enabled. This is diff --git a/resources/style.qss b/resources/style.qss index 1335f34..64e7f83 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -155,12 +155,6 @@ QTreeView QScrollBar:vertical { margin-top: 16px; } -QTreeView QScrollBar::sub-line:vertical { - border: 0; - background: #2b2b2b; - height: 16px; -} - QTextBrowser { background-color: #1a1a1a; selection-background-color: #1a73e8;