From 7733877cc978c1231737a78ad0bf5a12a2336925 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Oct 2019 21:36:12 +0530 Subject: [PATCH] Better fix for dark mode button text being black --- src/calibre/gui2/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index dd21a328a4..ecfcfb5098 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -1015,10 +1015,11 @@ class Application(QApplication): if self.is_dark_theme: pal = self.palette() pal.setColor(pal.Link, QColor('#6CB4EE')) - self.setPalette(pal) if isosx and self.using_calibre_style: # Workaround for https://bugreports.qt.io/browse/QTBUG-75321 - self.setStyleSheet('QComboBox { color: %s}' % pal.color(pal.WindowText).name(QColor.HexRgb)) + # Buttontext is set to black for some reason + pal.setColor(pal.ButtonText, pal.color(pal.WindowText)) + self.setPalette(pal) def load_calibre_style(self): icon_map = self.__icon_map_memory_ = {}