<table><tr><td style="">subdiff added a comment.
</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/D5928" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D5928#111959" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D5928#111959</a>, <a href="https://phabricator.kde.org/p/davidedmundson/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@davidedmundson</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>As for your comments:</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>The first one is, that the fading phases generate much DBus traffic, as you said. To solve this we would need to do the fading in KWin. For that we need timers, at least one. But it would make sense to have two timers, one for quick adjustments and one for long fades. >Because imagine the following:</p></blockquote>

<p>Not really. With any gradient or animation, you specify: startpoint, startvalue, endpoint, endvalue</p></div>
</blockquote>

<p>You forgot that we have a step size bigger than 1 on shifting the integer value of the color temperature (right now 50). QVariantAnimation also doesn't seem to support it directly.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>With that your "imagine the following" is easily solved, if you get a new sunset time or filter value you can immediately deduce the correct "current" value.</p></blockquote>

<p>It's not about deducing the current value (we already do that in <tt style="background: #ebebeb; font-size: 13px;">currentTargetTemp()</tt> - without use of the timers). It's about a two step operation: Changing to the currentTargetTemp and then (re)starting the slow fade process. The change to currentTargetTemp is suppposed to be faded as well (that's done by <tt style="background: #ebebeb; font-size: 13px;">m_quickAdjustTimer</tt>) and afterwards in step two we go through the slow fade (<tt style="background: #ebebeb; font-size: 13px;">m_slowUpdateTimer</tt>) or create a timer for the next slow fade to start (<tt style="background: #ebebeb; font-size: 13px;">m_slowUpdateStartTimer</tt>).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5928" rel="noreferrer">https://phabricator.kde.org/D5928</a></div></div><br /><div><strong>To: </strong>subdiff, KWin<br /><strong>Cc: </strong>cfeck, graesslin, davidedmundson, plasma-devel, kwin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas<br /></div>