mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for Qt 5 on windows bug that makes the selected indication for items in any list/table disappear when the widget loses focus
This commit is contained in:
parent
3c5acb5ed6
commit
b885936ee8
@ -930,6 +930,15 @@ class Application(QApplication):
|
||||
' which works well on Windows XP.') % 'http://download.calibre-ebook.com/1.48.0/', show=True)
|
||||
raise SystemExit(1)
|
||||
|
||||
if iswindows:
|
||||
# On windows the highlighted colors for inactive widgets are the
|
||||
# same as non highlighted colors. This is a regression from Qt 4.
|
||||
# https://bugreports.qt-project.org/browse/QTBUG-41060
|
||||
p = self.palette()
|
||||
for role in (p.Highlight, p.HighlightedText, p.Base, p.AlternateBase):
|
||||
p.setColor(p.Inactive, role, p.color(p.Active, role))
|
||||
self.setPalette(p)
|
||||
|
||||
def load_builtin_fonts(self, scan_for_fonts=False):
|
||||
if scan_for_fonts:
|
||||
from calibre.utils.fonts.scanner import font_scanner
|
||||
|
Loading…
x
Reference in New Issue
Block a user