From a2a9d41b334db36238232be8e093deeecab03514 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 26 Oct 2015 23:39:24 +0100 Subject: [PATCH] System Tray: Add ScrollArea to hidden items view Show vertical scrollbar when hidden items doesn't fit in popup. BUG: 341165 FIXED-IN: 5.5.0 REVIEW: 125775 --- .../contents/ui/ExpandedRepresentation.qml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml index 728452f81..a53be6cb0 100644 --- a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml +++ b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml @@ -76,13 +76,12 @@ KQuickControlsAddons.MouseEventListener { } } - ListView { + PlasmaExtras.ScrollArea { id: hiddenView - objectName: "hiddenView" - clip: false - width: parent.width - interactive: (contentHeight > height) + width: parent.width + horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff + verticalScrollBarPolicy: root.expandedTask ? Qt.ScrollBarAlwaysOff : Qt.ScrollBarAsNeeded anchors { top: snHeading.bottom @@ -90,11 +89,7 @@ KQuickControlsAddons.MouseEventListener { bottom: parent.bottom left: parent.left } - spacing: units.smallSpacing - - model: hiddenTasksModel - delegate: TaskListDelegate {} visible: { // Normal system tray case; clicked on arrow if (root.expandedTask == null) { @@ -113,6 +108,15 @@ KQuickControlsAddons.MouseEventListener { return root.expandedTask.status == SystemTray.Task.Passive; } + ListView { + clip: true + anchors.fill: parent + spacing: units.smallSpacing + + model: hiddenTasksModel + + delegate: TaskListDelegate {} + } } PlasmaCore.SvgItem {