Reviewing merge request #176: Fixes foreground colors of itemviews
a) The PrettyItemDelegate and others use the application palette and (worse) the QPalette::Text colorrole despite the effective background is QPalette::Window what breaks on color schemes that use black on white for Text/Base but white on black on WindowText/Window
-> Introduced a new helper function "PaletteHandler::foregroundColor()" to fetch the foregroundcolor from the painting widget role and palette, only falling back to the global palette and QPalette::WindowText
b) Several itemviews are set "transparent" by PaletteHandler::updateItemView() and setting the background color to QPalette::Base with a zero alpha.
-> This is inefficient and actually "wrong" as the visual color is no way related to the set one (ie. the set color is at best superflous)
==> instead set the proper color role, also align text/base and window/text (as several QItemDelegates assume and hardcode QPalette::Text for foreground) and disable the viewport) autoFilling.
Commits that would be merged:
Comments
There is one thing that is affected by setting the view transparent – during the expanding/collpasing animation. When that is happening, Qt sets the background to base (or window, I don’t remember). Since we are using a custom colour for the applet background the colour change is quite apprent.
Merged, thanks.


Add a new comment:
Login or create an account to post a comment