Files
noctalia-shell/Modules/Bar/Widgets/WallpaperSelector.qml
T

28 lines
928 B
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services
import qs.Widgets
NIconButton {
id: root
property ShellScreen screen
readonly property var _barConfig: screen ? Settings.getMonitorBarConfig(screen.name) : Settings.getDefaultBarConfig()
readonly property real capsuleHeight: BarService.getCapsuleHeight(_barConfig.density, _barConfig.position)
property bool barShowCapsule: true // Passed from Bar.qml
baseSize: capsuleHeight
applyUiScale: false
density: barDensity
icon: "wallpaper-selector"
tooltipText: I18n.tr("tooltips.open-wallpaper-selector")
tooltipDirection: BarService.getTooltipDirection(barPosition)
colorBg: (barShowCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mOnSurface
colorBorder: Color.transparent
colorBorderHover: Color.transparent
onClicked: PanelService.getPanel("wallpaperPanel", screen)?.toggle(this)
}