<table><tr><td style="">davidedmundson 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><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>
<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>
<p>(talking of which, look at QVariantAnimation instead of your quicksteps timer, it basically does the same thing, but wrapped away. Set the duration to the entire fade time, then use setCurrentTime on suspend)<br />
Also you shouldn't fear DBus traffic so much. Even if it was updating every second it wouldn't to be a problem.</p>
<p>The suspend argument makes sense...though I'm not sure you can really use that argument whilst you currently have a call to logind in the code.</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>graesslin, davidedmundson, plasma-devel, kwin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas<br /></div>