From 91326ec6d90cb46e5483ac7ac7c30b31721e6902 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 2 Feb 2020 13:07:24 +1000 Subject: [PATCH] only apply padding fix to stats screen It was breaking the display of dialogs like the filtered deck screen --- qt/aqt/stats.py | 3 +++ qt/aqt/theme.py | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qt/aqt/stats.py b/qt/aqt/stats.py index 846cf4770..8a6a2adf6 100644 --- a/qt/aqt/stats.py +++ b/qt/aqt/stats.py @@ -7,6 +7,7 @@ import time import aqt from anki.lang import _ from aqt.qt import * +from aqt.theme import theme_manager from aqt.utils import ( addCloseShortcut, getSaveFile, @@ -32,6 +33,8 @@ class DeckStats(QDialog): self.wholeCollection = False self.setMinimumWidth(700) f = self.form + if theme_manager.night_mode and not theme_manager.macos_dark_mode(): + self.setStyleSheet("QGroupBox { padding-top: 0; }") f.setupUi(self) restoreGeom(self, self.name) b = f.buttonBox.addButton(_("Save PDF"), QDialogButtonBox.ActionRole) diff --git a/qt/aqt/theme.py b/qt/aqt/theme.py index 102780f73..81541375f 100644 --- a/qt/aqt/theme.py +++ b/qt/aqt/theme.py @@ -118,10 +118,6 @@ QTreeWidget { QToolTip { border: 0; } - -QGroupBox { - padding-top: 0px; -} """ if not self.macos_dark_mode():