mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Live CSS: Fix regression causing incorrect colors in calibre 7.
Yet another Qt regression. Sigh. This time it looks like QPalette color propagation is broken.
This commit is contained in:
parent
c5a9ce6bfc
commit
826e35cb19
@ -193,6 +193,12 @@ class Declaration(QWidget):
|
||||
p.setPen(palette.color(QPalette.ColorRole.WindowText))
|
||||
if not self.is_first:
|
||||
p.drawLine(0, 0, self.width(), 0)
|
||||
parent = self
|
||||
while parent is not None:
|
||||
parent = parent.parent()
|
||||
if isinstance(parent, LiveCSS):
|
||||
palette = parent.palette()
|
||||
break
|
||||
try:
|
||||
for row in self.rows:
|
||||
for cell in row:
|
||||
|
Loading…
x
Reference in New Issue
Block a user