View Single Post
Old 08-12-2025, 12:28 PM   #583
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 876
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
Quote:
Originally Posted by wrCisco View Post

The only issue I had with the Sigil palette, is that I was using the role QtGui.QPalette.AlternateBase to paint alternating rows backgrounds, but in the Sigil palette that role is identical to the standard background, so now I check if the AlternateBase color is equal to the background of the widget and if so I use another one, something like:
Code:
bgColor = widget.palette().color(widget.backgroundRole())
alternateBgColor = widget.palette().color(QtGui.QPalette.AlternateBase)
if bgColor.getRgb() == alternateBgColor.getRgb():
    alternateBgColor = widget.palette().color(QtGui.QPalette.Base)
I'm not sure, but (I think) here it's a good idea to change the AlternateBase color directly in plugin_utils.py and then this condition will not be necessary.

I suggest the color:
Code:
p.setColor(QtGui.QPalette.AlternateBase, QtGui.QColor(66, 66, 66))
...which is the one we used in early versions of dark mode in Sigil.

@DiapDealer?
BeckyEbook is online now   Reply With Quote