Switch sender colors to use color palette
authorShane Synan <digitalcircuit36939@gmail.com>
Fri, 2 Dec 2016 22:36:36 +0000 (16:36 -0600)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 12 Apr 2017 20:51:18 +0000 (22:51 +0200)
commit12d401fe2949ca2c823ea38181361650eaaeae66
tree81ae5f208f2b7477a7cfef62aca71e8d5aaa7bed
parenta04eac3ffa53cb9eea9ebc46ea67a958f0269220
Switch sender colors to use color palette

Add "sender-color-[hash]" to the list of valid palette color roles.

Switch QtUiStyle::generateSettingsQss() to make use of the color
palette, rather than redundantly specifying the color.  This cleans
up the output of settings.qss, and (more importantly) allows custom
themes to do the same.

There's trade-offs involved with using the color palette directly
(similar to MarkerLine).  It would make the GUI capable of toggling
sender coloring in themes, which would be nice.  However, themes
would no longer be able to set sender colors independently for
different message types.

Though untested, there might be performance trade-offs with querying
the settings provider on each render, too.

This can be revisited in the future.
src/qtui/qtuistyle.cpp
src/qtui/qtuistyle.h
src/uisupport/qssparser.cpp
src/uisupport/uistyle.h