Commit 4a5ac4a6 authored by Marco Martin's avatar Marco Martin
Browse files

don't show notification when it shouldn't

parent c2d71ad6
......@@ -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
......
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