D8388: Do not hardcode unhovered windows brightness on present windows effect
Chris Holland <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
Zren added inline comments. INLINE COMMENTS > presentwindows.cpp:317 > else if (!isInMotion && w->isDesktop()) > - winData->highlight = 0.3; > + winData->highlight = m_unhoverBright; > else There's code in `PresentWindowsEffect::postPaintScreen()` that fires if it's using the magic number `0.3`. if (i.value().highlight != 0.3) `winData->highlight` is used to tell us how far into a "scale + brightness" tween we're in. data.multiplyBrightness(interpolate(0.4, 1.0, winData->highlight)); const qreal scale = interpolate(1.0, tScale, winData->highlight); tx = qRound((tx-rect.x())*winData->highlight); ty = qRound((ty-rect.y())*winData->highlight); rect.setWidth(rect.width()*scale); rect.setHeight(rect.height()*scale); So it controls more than just the brightness. We could change the code to: data.multiplyBrightness(interpolate(m_unhoverBright, 1.0, winData->highlight)); Which I know works: https://www.youtube.com/watch?v=QEHC43zMIMc#t=6m00 REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D8388 To: salvacorts, #kwin, #vdg, #plasma Cc: Zren, muratcileli, zzag, graesslin, ngraham, kwin, #kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart