From 590708da57e6dc57e5053de9473b7071f947da15 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Fri, 19 Sep 2025 11:24:46 -0400 Subject: [PATCH] Bar: New widget "Wallpaper Selector" to open the selector directly. --- Modules/Bar/Widgets/WallpaperSelector.qml | 23 +++++++++++++++++++++++ Services/BarWidgetRegistry.qml | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 Modules/Bar/Widgets/WallpaperSelector.qml diff --git a/Modules/Bar/Widgets/WallpaperSelector.qml b/Modules/Bar/Widgets/WallpaperSelector.qml new file mode 100644 index 00000000..8743be2d --- /dev/null +++ b/Modules/Bar/Widgets/WallpaperSelector.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell +import qs.Commons +import qs.Services +import qs.Widgets + +NIconButton { + id: root + + property ShellScreen screen + property real scaling: 1.0 + + baseSize: Style.capsuleHeight + compact: (Settings.data.bar.density === "compact") + icon: "wallpaper-selector" + tooltipText: "Open wallpaper selector" + colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) + colorFg: Color.mOnSurface + colorBorder: Color.transparent + colorBorderHover: Color.transparent + onClicked: PanelService.getPanel("wallpaperSelector")?.toggle(this) +} diff --git a/Services/BarWidgetRegistry.qml b/Services/BarWidgetRegistry.qml index 1a9e4aa4..304b018b 100644 --- a/Services/BarWidgetRegistry.qml +++ b/Services/BarWidgetRegistry.qml @@ -33,6 +33,7 @@ Singleton { "Tray": trayComponent, "Volume": volumeComponent, "WiFi": wiFiComponent, + "WallpaperSelector": wallpaperSelectorComponent, "Workspace": workspaceComponent }) @@ -177,6 +178,9 @@ Singleton { property Component wiFiComponent: Component { WiFi {} } + property Component wallpaperSelectorComponent: Component { + WallpaperSelector {} + } property Component workspaceComponent: Component { Workspace {} }