summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2017-01-13 11:23:49 +0000
committerDavid Edmundson <[email protected]>2017-01-16 13:29:30 +0000
commit5937f917b29388e849341c8f1ef03f3bfeba4456 (patch)
tree40d4af7f2014bd4a1b57675a133650a9560388e6
parent375ce8932ad3efe3c71abbde58e09382b9a120c1 (diff)
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
-rw-r--r--applets/appmenu/package/contents/ui/main.qml9
1 files changed, 4 insertions, 5 deletions
diff --git a/applets/appmenu/package/contents/ui/main.qml b/applets/appmenu/package/contents/ui/main.qml
index 85cdbc9..112c040 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