[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D13232: introduce Custom color set
From:       Marco Martin <noreply () phabricator ! kde ! org>
Date:       2018-06-04 11:28:17
Message-ID: 20180604112817.1.EA5208623297FCD5 () phabricator ! kde ! org
[Download RAW message or body]

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


[Attachment #3 (unknown)]

<table><tr><td style="">mart added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D13232">View Revision</a></tr></table><br \
/><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D13232#inline-68952">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">kirigamiplugin.cpp:172</span></div> <div \
style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: \
8px;">What&#039;s this?</p></div></div> <div style="margin: 8px 0; padding: 0 \
12px;"><p style="padding: 0; margin: 8px;">gah, sorry, remains of old \
attempts</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D13232#inline-68949">View \
Inline</a><span style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in \
<span style="color: #4b4d51; font-weight: bold;">platformtheme.cpp:314</span></div> \
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; \
margin: 8px;">Can this lead to issues with non-deterministic setting of properties? \
Ie. say <tt style="background: #ebebeb; font-size: \
13px;">Kirigami.Theme.textColor</tt> is evaluated before <tt style="background: \
#ebebeb; font-size: 13px;">Kirigami.Theme.colorSet: \
Kirigami.Theme.Custom</tt>?</p></div></div> <div style="margin: 8px 0; padding: 0 \
12px;"><p style="padding: 0; margin: 8px;">it would work fine, as writing to color \
properties always works...<br /> which is a thing i don&#039;t like much, but either \
properties are writable or not.<br /> if one writes the proeprties with another \
colorset, it would &quot;partly&quot; work, then all the customizations go away as \
soon as one of the implementations does a syncColors(), which is not pretty.</p>

<p style="padding: 0; margin: 8px;">the only thing i can think about to make it work \
in a more predictable way is:</p>

<p style="padding: 0; margin: 8px;">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-&gt;customTextColor : d-&gt;textColor</p>

<p style="padding: 0; margin: 8px;">(then a reset method could be \
implemented</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" \
href="https://phabricator.kde.org/D13232#inline-68950">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">platformtheme.h:79</span></div> <div \
style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: \
8px;">Do they need a <tt style="background: #ebebeb; font-size: \
13px;">RESET</tt>?</p></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p \
style="padding: 0; margin: 8px;">perhaps... i wouldn&#039;t know how to implement one \
with the current architecture<br /> (see the other comment for an \
idea)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D13232#inline-68953">View \
Inline</a><span style="color: #4b4d51; font-weight: bold;">broulik</span> wrote in \
<span style="color: #4b4d51; font-weight: bold;">platformtheme.h:220</span></div> \
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; \
margin: 8px;">Where is this used?</p></div></div> <div style="margin: 8px 0; padding: \
0 12px;"><p style="padding: 0; margin: 8px;">crap, another remain of old approach \
:)</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D13232">https://phabricator.kde.org/D13232</a></div></div><br \
/><div><strong>To: </strong>mart, Kirigami, broulik<br /><strong>Cc: \
</strong>plasma-devel, apol, davidedmundson, mart, hein<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic