D13232: introduce Custom color set

Marco Martin noreply at phabricator.kde.org
Mon Jun 4 11:28:17 UTC 2018


mart added inline comments.

INLINE COMMENTS

> broulik wrote in kirigamiplugin.cpp:172
> What's this?

gah, sorry, remains of old attempts

> broulik wrote in platformtheme.cpp:314
> Can this lead to issues with non-deterministic setting of properties? Ie. say `Kirigami.Theme.textColor` is evaluated before `Kirigami.Theme.colorSet: Kirigami.Theme.Custom`?

it would work fine, as writing to color properties always works...
which is a thing i don't like much, but either properties are writable or not.
if one writes the proeprties with another colorset, it would "partly" work, then all the customizations go away as soon as one of the implementations does a syncColors(), which is not pretty.

the only thing i can think about to make it work in a more predictable way is:

duplicate every setter, with setCustomTextColor etc (so setTextColor to be used only by implementations), and store all the custom colors in different members, then textColor() would be return colorSet == custom ? d->customTextColor : d->textColor

(then a reset method could be implemented

> broulik wrote in platformtheme.h:79
> Do they need a `RESET`?

perhaps... i wouldn't know how to implement one with the current architecture
(see the other comment for an idea)

> broulik wrote in platformtheme.h:220
> Where is this used?

crap, another remain of old approach :)

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D13232

To: mart, #kirigami, broulik
Cc: plasma-devel, apol, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180604/23808314/attachment-0001.html>


More information about the Plasma-devel mailing list