D11175: [WIP][kstyle] refine shadows

Vlad Zagorodniy noreply at phabricator.kde.org
Fri Mar 9 23:10:19 UTC 2018


zzag added a comment.


  > But then, this code is compiled in a separate library ? 
  >  How is it linked against the kstyle code ? Doesn't that require changes to CMakeLists ? I'm confused.
  
  Yes, it is compiled as a separate shared library. Yes, it requires changes to CMakeLists.txt. (e.g. add `include_directories` and `target_link_libraries`)
  
  > (sorry if I missed something: I have not had the time to actually try apply the patches and compile them).
  
  That's good because they don't build with KDE4. (I will post updated patches soon)
  
  > So that means that the code is not actually shared, but copied ? I am fine with this also, I just don't see how it works here .
  
  For the most part, yes..
  
  It works as follows:
  
  - create a "render" target (`QPixmap` or `QImage`)
  - paint each separate shadow onto that render target with `BoxShadowHelper::boxShadow()`. Please note, each shadow is centered around some box so all shadows are aligned.
  - clip inner rect
  - pass the result somewhere along
  
  > Not sure I understand what you mean by DRY obsession ?
  
  Some people try to get rid of repetitions even when it's not really needed.
  
  ---
  
  Also, could you please point me out how to create shadows on plugin load? Maybe, I could implement it..

REPOSITORY
  R31 Breeze

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

To: zzag, #breeze, #vdg, hpereiradacosta
Cc: ngraham, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180309/6c00057a/attachment.html>


More information about the Plasma-devel mailing list