From 5937f917b29388e849341c8f1ef03f3bfeba4456 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 13 Jan 2017 11:23:49 +0000 Subject: [PATCH] Keep AppletMenu as small as possible Summary: In retrospect there's no need to fill the width, if people want that effect they can add a spacer; whereas you can't do the opposite. Also set the size to 0 when it's empty. This mean using status as normally PanelContainment ensures plasmoid's are a minimum of a square. BUG: 374996 Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4115 --- applets/appmenu/package/contents/ui/main.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/applets/appmenu/package/contents/ui/main.qml b/applets/appmenu/package/contents/ui/main.qml index 85cdbc9b6..112c040e5 100644 --- a/applets/appmenu/package/contents/ui/main.qml +++ b/applets/appmenu/package/contents/ui/main.qml @@ -40,9 +40,6 @@ Item { plasmoid.nativeInterface.view = view } - Layout.minimumWidth: units.gridUnit - Layout.minimumHeight: units.gridUnit - Plasmoid.preferredRepresentation: (plasmoid.configuration.compactView || vertical || !appletEnabled) ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation Plasmoid.compactRepresentation: PlasmaComponents.ToolButton { @@ -66,8 +63,10 @@ Item { Plasmoid.fullRepresentation: GridLayout { id: buttonGrid - Layout.fillWidth: !root.vertical - Layout.fillHeight: root.vertical + Plasmoid.status: buttonRepeater.count > 0 ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.HiddenStatus + Layout.minimumWidth: implicitWidth + Layout.minimumHeight: implicitHeight + flow: root.vertical ? GridLayout.TopToBottom : GridLayout.LeftToRight rowSpacing: units.smallSpacing columnSpacing: units.smallSpacing