Better fix for dark mode button text being black

This commit is contained in:
Kovid Goyal 2019-10-14 21:36:12 +05:30
parent 9c4bd9de0e
commit 7733877cc9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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_ = {}