mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
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.
32 lines
837 B
QML
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()
|
|
}
|
|
}
|
|
}
|