mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-25 19:34:13 +02:00
6404612014
The folio tab widget carries a style sheet, and QStyleSheetStyle pins the palette of every widget under it to the application palette in force when the sheet was applied. After a live light/dark switch the view's own palette() is therefore stale: the folio kept its dark sheet after a switch to light, and kept its white sheet after a switch to dark. PaletteGraphicsView now reads the application palette both for the decision to invert and for the sheet and ink colors. Test in tst_qetpalette: paletteViewFollowsTheApplicationUnderAStyleSheet puts the view in a tab widget with a style sheet and switches the application palette to dark and back.