mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -47,7 +47,7 @@ class ImageView(QDialog):
|
|||||||
self.geom_name = geom_name
|
self.geom_name = geom_name
|
||||||
|
|
||||||
self.label = l = QLabel(self)
|
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.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
|
||||||
l.setScaledContents(True)
|
l.setScaledContents(True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user