From 5e23476089839c2708170faf08824028cf3fa9db Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 9 Sep 2025 08:17:00 -0400 Subject: [PATCH 1/3] NIconButton: font size auto determined by button size --- Widgets/NIconButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index bb37444..e5576ed 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -40,7 +40,7 @@ Rectangle { NIcon { icon: root.icon - font.pointSize: Style.fontSizeM * scaling + font.pointSize: Math.max(1, root.width * 0.4) color: root.enabled && root.hovering ? colorFgHover : colorFg // Center horizontally x: (root.width - width) / 2 From 4455074493e180a6136ca65104d638c06e487047 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 9 Sep 2025 08:23:34 -0400 Subject: [PATCH 2/3] ActiveWindow+MediaMini: auto min & max width --- Modules/Bar/Widgets/ActiveWindow.qml | 5 +++-- Modules/Bar/Widgets/MediaMini.qml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 7ce8e3f..e55086e 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -33,8 +33,9 @@ RowLayout { readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon - readonly property real minWidth: 160 - readonly property real maxWidth: 400 + // 5% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.05) + readonly property real maxWidth: minWidth * 2 Layout.alignment: Qt.AlignVCenter spacing: Style.marginS * scaling visible: getTitle() !== "" diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index dafa9a6..213d963 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -38,8 +38,9 @@ RowLayout { readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType !== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType - readonly property real minWidth: 160 - readonly property real maxWidth: 400 + // 5% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.05) + readonly property real maxWidth: minWidth * 2 function getTitle() { return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "") From 73541eec49ad6467d1459de81c269f1c79a22f51 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 9 Sep 2025 08:25:25 -0400 Subject: [PATCH 3/3] ActiveWindow + MediaMini: width boosted to 6% --- Modules/Bar/Widgets/ActiveWindow.qml | 11 ++++++----- Modules/Bar/Widgets/MediaMini.qml | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 5291991..473bdfe 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -33,17 +33,18 @@ RowLayout { readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon - // 5% of total width - readonly property real minWidth: Math.max(1, screen.width * 0.05) + // 6% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.06) readonly property real maxWidth: minWidth * 2 - Layout.alignment: Qt.AlignVCenter - spacing: Style.marginS * scaling - visible: getTitle() !== "" function getTitle() { return CompositorService.focusedWindowTitle !== "(No active window)" ? CompositorService.focusedWindowTitle : "" } + Layout.alignment: Qt.AlignVCenter + spacing: Style.marginS * scaling + visible: getTitle() !== "" + function getAppIcon() { // Try CompositorService first const focusedWindow = CompositorService.getFocusedWindow() diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 213d963..aa00cb9 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -38,8 +38,8 @@ RowLayout { readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType !== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType - // 5% of total width - readonly property real minWidth: Math.max(1, screen.width * 0.05) + // 6% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.06) readonly property real maxWidth: minWidth * 2 function getTitle() {