From 4a5ac4a6aa05fe2901a3b33e14735b1fd7f97ec7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 1 Sep 2020 17:40:09 +0200 Subject: [PATCH] don't show notification when it shouldn't --- containments/panel/package/contents/ui/FullContainer.qml | 8 +++++++- containments/panel/package/contents/ui/main.qml | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/containments/panel/package/contents/ui/FullContainer.qml b/containments/panel/package/contents/ui/FullContainer.qml index 9ad62947..178e3c58 100644 --- a/containments/panel/package/contents/ui/FullContainer.qml +++ b/containments/panel/package/contents/ui/FullContainer.qml @@ -27,10 +27,13 @@ DrawerBackground { property Item applet property ObjectModel fullRepresentationModel property ListView fullRepresentationView - visible: applet && (applet.status != PlasmaCore.Types.HiddenStatus && applet.status != PlasmaCore.Types.PassiveStatus) + visible: shouldBeVisible + property bool shouldBeVisible: applet && (applet.status != PlasmaCore.Types.HiddenStatus && applet.status != PlasmaCore.Types.PassiveStatus) height: parent.height width: visible ? quickSettingsParent.width : 0 Layout.minimumHeight: applet && applet.switchHeight + onShouldBeVisibleChanged: fullContainer.visible = fullContainer.shouldBeVisible + onVisibleChanged: { if (visible) { for (var i = 0; i < fullRepresentationModel.count; ++i) { @@ -47,6 +50,9 @@ DrawerBackground { fullRepresentationModel.remove(ObjectModel.index); fullRepresentationView.forceLayout(); } + if (!shouldBeVisible) { + visible = false; + } } Connections { target: fullContainer.applet diff --git a/containments/panel/package/contents/ui/main.qml b/containments/panel/package/contents/ui/main.qml index 4be7ce38..b626a395 100644 --- a/containments/panel/package/contents/ui/main.qml +++ b/containments/panel/package/contents/ui/main.qml @@ -302,10 +302,10 @@ Item { } } - ListView { id: fullRepresentationView z: 1 + interactive: width < contentWidth //parent: slidingPanel.wideScreen ? slidingPanel.flickable.contentItem : panelContents Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, quickSettingsParent.width*fullRepresentationModel.count) : panelContents.width //Layout.fillWidth: true @@ -328,7 +328,7 @@ Item { orientation: ListView.Horizontal MouseArea { - //parent: fullRepresentationView.contentItem + parent: fullRepresentationView.contentItem anchors.fill: parent z: -1