mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
don't show notification when it shouldn't
This commit is contained in:
parent
c2d71ad6f2
commit
4a5ac4a6aa
2 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue