mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 23:45:59 +01:00
Viewer: In dark mode when showing images with transparency in the popup use a light background color as most images are designed with a light background color in mind. Fixes #1903423 [ebook-viewer: Transparent PNG renders strangely in dark mode viewer](https://bugs.launchpad.net/calibre/+bug/1903423)
This commit is contained in:
parent
a3f829a6fa
commit
8d16daab6e
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ def __init__(self, parent, current_img, current_url, geom_name='viewer_image_pop
|
|||
self.geom_name = geom_name
|
||||
|
||||
self.label = l = QLabel(self)
|
||||
l.setBackgroundRole(QPalette.Base)
|
||||
l.setBackgroundRole(QPalette.Text if QApplication.instance().is_dark_theme else QPalette.Base)
|
||||
l.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
|
||||
l.setScaledContents(True)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue