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:
Kovid Goyal 2020-11-08 11:59:53 +05:30
parent a3f829a6fa
commit 8d16daab6e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -47,7 +47,7 @@ class ImageView(QDialog):
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)