uistyle: Define via stylesheet if color codes have an effect
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 7 Mar 2018 19:59:37 +0000 (20:59 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 8 Mar 2018 01:10:28 +0000 (02:10 +0100)
commitb12b02f1bd5ee8a68bda20622b7ec3eac84f000c
tree0ac9306735cb767b886676429fdc209fb39c827a
parentd59ac6d2c7ac587d6cc3a36b627ddd1fd03f47d6
uistyle: Define via stylesheet if color codes have an effect

In certain situations, color codes should have no effect, e.g. when
selecting text. This required hacks in stylesheets; for example
when setting a foreground color for self or highlighted messages,
the mIRC colors had to be redefined in the stylesheet for that label.
Also the code had some workaround, e.g. for URLs.

With the introduction of the non-styleable extended mIRC and
hex colors, these workarounds are no longer possible.

Solve these issues by introducing two new properties that can be set
in the stylesheet:

allow-foreground-override: true|false
allow-background-override: true|false

The default stylesheet sets them to true by default, and to false
e.g. for selections.

Remove the now unneeded workaround from m4yer's stylesheet, too.
data/stylesheets/default.qss
data/stylesheets/m4yer.qss
src/uisupport/qssparser.cpp
src/uisupport/qssparser.h
src/uisupport/uistyle.cpp
src/uisupport/uistyle.h