mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
ConfigurationAppletPage: make sure item and plasmoid are not null
This commit is contained in:
parent
ed87f57938
commit
5183fce7f7
1 changed files with 11 additions and 1 deletions
|
|
@ -41,9 +41,19 @@ Kirigami.ScrollablePage {
|
||||||
// If it is zero fall back to the height of its children
|
// 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
|
// 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
|
// 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)
|
height: {
|
||||||
|
if (item) {
|
||||||
|
return Math.max(root.availableHeight, item.implicitHeight ? item.implicitHeight : item.childrenRect.height);
|
||||||
|
} else {
|
||||||
|
return root.availableHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
if (!plasmoid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const plasmoidConfig = plasmoid.configuration
|
const plasmoidConfig = plasmoid.configuration
|
||||||
|
|
||||||
const props = {}
|
const props = {}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue