Commit 56513036 authored by Nicolas Fella's avatar Nicolas Fella

[plasmoidconfig] Fix sizing for some configurations

We'd like to rely on the config to give us an appropriate
implicitHeight, but some configs do the opposite and assume they fill
the parent. The old code resolved this by making the config at least as
high as its parent. Reintroduce that.

This is arguably all very ugly and should be resolved properly, but that
requires changing the configs themselves, which is infeasible for Plasma
5 with regards to third-party applets

BUG: 429797
parent 7ed963fa
......@@ -44,9 +44,13 @@ Kirigami.ScrollablePage {
Loader {
id: loader
width: parent.width
// HACK the height of the loader is based on the implicitHeight of the content
// If the content item doesn't set one fall back to the height of its children
height: item.implicitHeight ? item.implicitHeight : item.childrenRect.height
// HACK the height of the loader is based on the implicitHeight of the content.
// Unfortunately not all content items have a sensible implicitHeight.
// If it is zero fall back to the height of its children
// Also make it at least as high as the page itself. Some existing configs assume they fill the whole space
// TODO KF6 clean this up by making all configs based on SimpleKCM/ScrollViewKCM/GridViewKCM
height: Math.max(root.availableHeight, item.implicitHeight ? item.implicitHeight : item.childrenRect.height)
Component.onCompleted: {
var plasmoidConfig = plasmoid.configuration
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment