Skip to content
Snippets Groups Projects

qml: do not create csd shadow effect if it is not used

Open Fatih Uzunoğlu requested to merge fuzun/vlc:qt/dontcreateshadowifnotused into master
  1. Apr 03, 2025
    • Fatih Uzunoğlu's avatar
      qml: do not create csd shadow effect if it is not used · 8cd0f56b
      Fatih Uzunoğlu authored
      This follows the approach that has been working well in
      a lot of places: create the item once it is necessary
      to be used and do not destroy it.
      
      I don't think it is worth to use `Loader` just to load
      and unload the effect depending on whether CSD is active,
      which can be changed while the application is alive.
      This is because it is not expected that the user switches
      CSD many times, and the effect is simple enough to be
      just kept alive instead. `Loader` is usually used for
      heavy items.
      
      In any case it does not make sense to create it if the
      window does not support CSD, or the platform handles
      the shadows.
      8cd0f56b
Loading