From 7d07f8175da4d37641a74321237da3fe163652a6 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 22:01:12 +1000 Subject: bar: minor code changes --- modules/bar/Pills.qml | 2 +- modules/bar/components/Tray.qml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/bar/Pills.qml b/modules/bar/Pills.qml index f608549..503de02 100644 --- a/modules/bar/Pills.qml +++ b/modules/bar/Pills.qml @@ -84,7 +84,7 @@ Item { StatusIcons { anchors.left: root.get(tray.right, undefined) - anchors.leftMargin: root.get(Appearance.padding.normal, 0) + anchors.leftMargin: root.get(Appearance.padding.large, 0) anchors.top: root.get(undefined, tray.bottom) anchors.topMargin: root.get(0, Appearance.padding.large) diff --git a/modules/bar/components/Tray.qml b/modules/bar/components/Tray.qml index 7cc93be..37de73b 100644 --- a/modules/bar/components/Tray.qml +++ b/modules/bar/components/Tray.qml @@ -10,6 +10,7 @@ import Qt5Compat.GraphicalEffects StyledRect { animate: true clip: true + visible: width > 0 && height > 0 // To avoid warnings about being visible with no size BoxLayout { Repeater { @@ -21,8 +22,8 @@ StyledRect { required property SystemTrayItem modelData acceptedButtons: Qt.LeftButton | Qt.RightButton - width: Math.round(Appearance.font.size.large * 1.2) - height: Math.round(Appearance.font.size.large * 1.2) + width: Appearance.font.size.smaller * 2 + height: Appearance.font.size.smaller * 2 onClicked: event => { if (event.button === Qt.LeftButton) @@ -31,6 +32,7 @@ StyledRect { menu.open(); } + // TODO custom menu QsMenuAnchor { id: menu -- cgit v1.2.3-freya