From 252f19ec0ec902c1fbb650260b29f1e63fc55867 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 13 Sep 2025 19:07:04 +1000 Subject: launcher: prevent overlap with dashboard Fixes #612 --- modules/launcher/Content.qml | 2 ++ modules/launcher/ContentList.qml | 6 +++--- modules/launcher/Wrapper.qml | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'modules/launcher') diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml index f4e1b45..f674569 100644 --- a/modules/launcher/Content.qml +++ b/modules/launcher/Content.qml @@ -13,6 +13,7 @@ Item { required property PersistentProperties visibilities required property var panels + required property real maxHeight readonly property int padding: Appearance.padding.large readonly property int rounding: Appearance.rounding.large @@ -36,6 +37,7 @@ Item { content: root visibilities: root.visibilities panels: root.panels + maxHeight: root.maxHeight - searchWrapper.implicitHeight - root.padding * 3 search: search padding: root.padding rounding: root.rounding diff --git a/modules/launcher/ContentList.qml b/modules/launcher/ContentList.qml index a6ccf53..b2a9c77 100644 --- a/modules/launcher/ContentList.qml +++ b/modules/launcher/ContentList.qml @@ -14,6 +14,7 @@ Item { required property var content required property PersistentProperties visibilities required property var panels + required property real maxHeight required property StyledTextField search required property int padding required property int rounding @@ -33,7 +34,7 @@ Item { PropertyChanges { root.implicitWidth: Config.launcher.sizes.itemWidth - root.implicitHeight: appList.implicitHeight > 0 ? appList.implicitHeight : empty.implicitHeight + root.implicitHeight: Math.min(root.maxHeight, appList.implicitHeight > 0 ? appList.implicitHeight : empty.implicitHeight) appList.active: true } @@ -78,8 +79,7 @@ Item { active: false - anchors.left: parent.left - anchors.right: parent.right + anchors.fill: parent sourceComponent: AppList { search: root.search diff --git a/modules/launcher/Wrapper.qml b/modules/launcher/Wrapper.qml index 51354c2..3312d5a 100644 --- a/modules/launcher/Wrapper.qml +++ b/modules/launcher/Wrapper.qml @@ -8,12 +8,22 @@ import QtQuick Item { id: root + required property ShellScreen screen required property PersistentProperties visibilities required property var panels readonly property bool shouldBeActive: visibilities.launcher && Config.launcher.enabled property int contentHeight + readonly property real maxHeight: { + let max = screen.height - Config.border.thickness * 2 - Appearance.spacing.large; + if (visibilities.dashboard) + max -= panels.dashboard.nonAnimHeight; + return max; + } + + onMaxHeightChanged: timer.start() + visible: height > 0 implicitHeight: 0 implicitWidth: content.implicitWidth @@ -84,7 +94,7 @@ Item { interval: Appearance.anim.durations.extraLarge onRunningChanged: { - if (running) { + if (running && !root.shouldBeActive) { content.visible = false; content.active = true; } else { @@ -108,6 +118,9 @@ Item { sourceComponent: Content { visibilities: root.visibilities panels: root.panels + maxHeight: root.maxHeight + + Component.onCompleted: root.contentHeight = implicitHeight } } } -- cgit v1.2.3-freya