Files
noctalia-shell/Modules/Bar/Widgets/WallpaperSelector.qml
T
onelocked acc5b2cd27 Fix: WallpaperSelector widget panel positioning
When clicking the Wallpaper Selector button in the bar, it did not
respect the users position choice. For example if set to bottom right,
it would still follow bar position.
2025-11-11 19:29:29 +00:00

32 lines
837 B
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services.UI
import qs.Widgets
NIconButton {
id: root
property ShellScreen screen
baseSize: Style.capsuleHeight
applyUiScale: false
density: Settings.data.bar.density
icon: "wallpaper-selector"
tooltipText: I18n.tr("tooltips.open-wallpaper-selector")
tooltipDirection: BarService.getTooltipDirection()
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mOnSurface
colorBorder: Color.transparent
colorBorderHover: Color.transparent
onClicked: {
var wallpaperPanel = PanelService.getPanel("wallpaperPanel", screen)
if (Settings.data.wallpaper.panelPosition === "follow_bar") {
wallpaperPanel?.toggle(this)
} else {
wallpaperPanel?.toggle()
}
}
}