Tray: Bar display improvement

This commit is contained in:
ItsLemmy
2025-11-06 21:53:02 -05:00
parent fc0c902305
commit 02da218d64
+8 -7
View File
@@ -35,7 +35,8 @@ Rectangle {
readonly property string barPosition: Settings.data.bar.position readonly property string barPosition: Settings.data.bar.position
readonly property bool isVertical: barPosition === "left" || barPosition === "right" readonly property bool isVertical: barPosition === "left" || barPosition === "right"
readonly property bool density: Settings.data.bar.density readonly property bool density: Settings.data.bar.density
property real itemSize: Math.round(Style.capsuleHeight * 0.65) readonly property real iconSize: Math.round(Style.capsuleHeight * 0.65)
property list<string> blacklist: widgetSettings.blacklist || widgetMetadata.blacklist || [] // Read from settings property list<string> blacklist: widgetSettings.blacklist || widgetMetadata.blacklist || [] // Read from settings
property list<string> favorites: widgetSettings.favorites || widgetMetadata.favorites || [] // Pinned items (shown inline) property list<string> favorites: widgetSettings.favorites || widgetMetadata.favorites || [] // Pinned items (shown inline)
property bool drawerEnabled: widgetSettings.drawerEnabled !== undefined ? widgetSettings.drawerEnabled : (widgetMetadata.drawerEnabled !== undefined ? widgetMetadata.drawerEnabled : true) // Enable drawer panel property bool drawerEnabled: widgetSettings.drawerEnabled !== undefined ? widgetSettings.drawerEnabled : (widgetMetadata.drawerEnabled !== undefined ? widgetMetadata.drawerEnabled : true) // Enable drawer panel
@@ -194,8 +195,7 @@ Rectangle {
Flow { Flow {
id: trayFlow id: trayFlow
anchors.centerIn: parent spacing: Style.marginXS
spacing: Style.marginM
flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight
Repeater { Repeater {
@@ -203,14 +203,15 @@ Rectangle {
model: root.filteredItems model: root.filteredItems
delegate: Item { delegate: Item {
width: itemSize width: Style.capsuleHeight
height: itemSize height: Style.capsuleHeight
visible: modelData visible: modelData
IconImage { IconImage {
id: trayIcon id: trayIcon
width: iconSize
anchors.fill: parent height: iconSize
anchors.centerIn: parent
asynchronous: true asynchronous: true
backer.fillMode: Image.PreserveAspectFit backer.fillMode: Image.PreserveAspectFit
source: { source: {