diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index d1c6c2c..473bdfe 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -33,16 +33,18 @@ RowLayout { readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon - readonly property real minWidth: 160 - readonly property real maxWidth: 400 - Layout.alignment: Qt.AlignVCenter - spacing: Style.marginS * scaling - visible: getTitle() !== "" + // 6% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.06) + readonly property real maxWidth: minWidth * 2 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 dafa9a6..aa00cb9 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 + // 6% of total width + readonly property real minWidth: Math.max(1, screen.width * 0.06) + readonly property real maxWidth: minWidth * 2 function getTitle() { return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "") 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