Skip to content

kcms/wallpaper: make long wallpaper plugins scrollable

Reason for the change

Wallpaper plugins can (and usually do) have their own settings, which are dynamically loaded. There is a problem though because some wallpaper plugins are based around a resizable view (such as a gridview of images) that provides its own scollview and expect to fill the available area, while others just provide items and rely on the loading container to provide scrollability.

Instead, we set the implicitSize of the loader to its content and adjust the main layout height accordingly if necessary (so (implicitly) large items will cause scrollability, but keep the loader filling the layout (so resizable views take up the whole space). Along the way, we fix a warning during the loading of the kcm.

Test plan

  1. Install a wallpaper plugin that can take a lot of space without being itself scrollable (e.g. plasma-smart-video-wallpaper-reborn from the bug report)
  2. Switch to it (and make it larger by clicking the buttons)
  3. (without) can't scroll to see everything (with) can scroll to see everything
  4. verify that plugins based around resizable views (e.g. image, slideshow) still fill the available space properly.

Screenshots or screen recordings

Before After
video video_before video_after
image (should be unchanged) image_before image_after

Bugs fixed

BUG: 489580

Merge request reports

Loading