standardize services import alias to S in applets and lock

This commit is contained in:
Damocles 2026-04-17 23:13:54 +02:00
parent 0160e4a1fb
commit 9a079fe2f1
10 changed files with 202 additions and 202 deletions

View file

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -14,8 +14,8 @@ Column {
function _loadColor(pct) { function _loadColor(pct) {
const t = Math.max(0, Math.min(100, pct)) / 100; const t = Math.max(0, Math.min(100, pct)) / 100;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A; const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08; const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2; const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1); return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
} }
@ -54,7 +54,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 16 width: parent.width - 16
height: 1 height: 1
color: M.Theme.base03 color: S.Theme.base03
} }
// Row content pinned to bottom of delegate // Row content pinned to bottom of delegate
@ -69,9 +69,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: index text: index
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 16 width: 16
} }
@ -86,7 +86,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 2 radius: 2
} }
@ -147,9 +147,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: parent.parent._f.toFixed(2) text: parent.parent._f.toFixed(2)
color: parent.parent._throttled ? M.Theme.base08 : M.Theme.base04 color: parent.parent._throttled ? S.Theme.base08 : S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 34 width: 34
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
} }
@ -162,7 +162,7 @@ Column {
width: root.width - 16 width: root.width - 16
height: 1 height: 1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03 color: S.Theme.base03
} }
Item { Item {
@ -174,9 +174,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "PROCESS" text: "PROCESS"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.letterSpacing: 1 font.letterSpacing: 1
} }
@ -185,9 +185,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "CPU" text: "CPU"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.letterSpacing: 1 font.letterSpacing: 1
} }
} }
@ -206,9 +206,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd text: modelData.cmd
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
width: parent.width - 80 width: parent.width - 80
} }
@ -219,8 +219,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.cpu.toFixed(1) + "%" text: modelData.cpu.toFixed(1) + "%"
color: root._loadColor(modelData.cpu) color: root._loadColor(modelData.cpu)
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 36 width: 36
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
} }

View file

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -19,8 +19,8 @@ Column {
function _barColor(pct) { function _barColor(pct) {
const t = Math.max(0, Math.min(100, pct)) / 100; const t = Math.max(0, Math.min(100, pct)) / 100;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A; const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08; const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2; const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1); return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
} }
@ -39,9 +39,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.target text: modelData.target
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
width: 72 width: 72
} }
@ -57,7 +57,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 2 radius: 2
} }
@ -80,9 +80,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root._fmt(modelData.usedBytes) + "/" + root._fmt(modelData.totalBytes) text: root._fmt(modelData.usedBytes) + "/" + root._fmt(modelData.totalBytes)
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 72 width: 72
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
} }

View file

@ -1,16 +1,16 @@
import QtQuick import QtQuick
import Quickshell import Quickshell
import "../services" as M import "../services" as S
Item { Item {
id: root id: root
property bool running: false property bool running: false
property bool reducedMotion: M.Theme.reducedMotion property bool reducedMotion: S.Theme.reducedMotion
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base01 color: S.Theme.base01
} }
ShaderEffect { ShaderEffect {
@ -24,9 +24,9 @@ Item {
property real uGlitch: 0 property real uGlitch: 0
property real uGlitchSeed: 0.0 property real uGlitchSeed: 0.0
property vector4d uResolution: Qt.vector4d(width, height, 0, 0) property vector4d uResolution: Qt.vector4d(width, height, 0, 0)
property color uC0: M.Theme.base0C property color uC0: S.Theme.base0C
property color uC1: M.Theme.base0E property color uC1: S.Theme.base0E
property color uC2: M.Theme.base09 property color uC2: S.Theme.base09
Connections { Connections {
target: root target: root

View file

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -35,7 +35,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 3 radius: 3
} }
@ -43,7 +43,7 @@ Column {
Rectangle { Rectangle {
width: parent.width * Math.min(1, (root.usedGb + root.cachedGb) / Math.max(root.totalGb, 0.001)) width: parent.width * Math.min(1, (root.usedGb + root.cachedGb) / Math.max(root.totalGb, 0.001))
height: parent.height height: parent.height
color: M.Theme.base0D color: S.Theme.base0D
opacity: 0.4 opacity: 0.4
radius: 3 radius: 3
Behavior on width { Behavior on width {
@ -79,7 +79,7 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
height: 18 height: 18
property var _hist: M.SystemStats.memHistory property var _hist: S.SystemStats.memHistory
property color _col: root.accentColor property color _col: root.accentColor
on_HistChanged: if (root.active) on_HistChanged: if (root.active)
@ -119,9 +119,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Used" text: "Used"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Text { Text {
@ -129,9 +129,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.usedGb) text: root._fmt(root.usedGb)
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
} }
@ -144,9 +144,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Cached" text: "Cached"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Text { Text {
@ -154,9 +154,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.cachedGb) text: root._fmt(root.cachedGb)
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
} }
@ -169,9 +169,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Available" text: "Available"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Text { Text {
@ -179,9 +179,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.availGb) text: root._fmt(root.availGb)
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
} }
@ -194,9 +194,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Total" text: "Total"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Text { Text {
@ -204,9 +204,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.totalGb) text: root._fmt(root.totalGb)
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
} }
@ -215,7 +215,7 @@ Column {
width: root.width - 16 width: root.width - 16
height: 1 height: 1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03 color: S.Theme.base03
} }
Item { Item {
@ -227,9 +227,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "PROCESS" text: "PROCESS"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.letterSpacing: 1 font.letterSpacing: 1
} }
@ -238,9 +238,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "MEM" text: "MEM"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.letterSpacing: 1 font.letterSpacing: 1
} }
} }
@ -259,9 +259,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd text: modelData.cmd
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
width: parent.width - 80 width: parent.width - 80
} }
@ -271,9 +271,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.mem.toFixed(1) + "%" text: modelData.mem.toFixed(1) + "%"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 36 width: 36
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
} }

View file

@ -1,6 +1,6 @@
import QtQuick import QtQuick
import Quickshell.Services.Mpris import Quickshell.Services.Mpris
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -23,7 +23,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
} }
// Outgoing art - snaps to current opacity, then fades out // Outgoing art - snaps to current opacity, then fades out
@ -137,7 +137,7 @@ Column {
} }
GradientStop { GradientStop {
position: 1 position: 1
color: M.Theme.base01 color: S.Theme.base01
} }
} }
} }
@ -145,9 +145,9 @@ Column {
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: "\uF001" text: "\uF001"
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: 28 font.pixelSize: 28
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
visible: !_artImg._hasArt visible: !_artImg._hasArt
} }
} }
@ -169,9 +169,9 @@ Column {
Text { Text {
width: parent.width width: parent.width
text: root.player?.trackTitle || "No track" text: root.player?.trackTitle || "No track"
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize + 1 font.pixelSize: S.Theme.fontSize + 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: true font.bold: true
elide: Text.ElideRight elide: Text.ElideRight
} }
@ -185,9 +185,9 @@ Column {
const artist = Array.isArray(p.trackArtists) ? p.trackArtists.join(", ") : (p.trackArtists || ""); const artist = Array.isArray(p.trackArtists) ? p.trackArtists.join(", ") : (p.trackArtists || "");
return [artist, p.trackAlbum].filter(s => s).join(" \u2014 "); return [artist, p.trackAlbum].filter(s => s).join(" \u2014 ");
} }
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
visible: text !== "" visible: text !== ""
} }
@ -214,18 +214,18 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: parent._fmtTime(parent.pos) text: parent._fmtTime(parent.pos)
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Text { Text {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: parent._fmtTime(parent.dur) text: parent._fmtTime(parent.dur)
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Item { Item {
@ -236,7 +236,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 2 radius: 2
} }
Rectangle { Rectangle {
@ -259,9 +259,9 @@ Column {
Text { Text {
text: "\uF048" text: "\uF048"
color: root.player?.canGoPrevious ? M.Theme.base05 : M.Theme.base03 color: root.player?.canGoPrevious ? S.Theme.base05 : S.Theme.base03
font.pixelSize: M.Theme.fontSize + 4 font.pixelSize: S.Theme.fontSize + 4
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
TapHandler { TapHandler {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -273,8 +273,8 @@ Column {
Text { Text {
text: root.playing ? "\uF04C" : "\uF04B" text: root.playing ? "\uF04C" : "\uF04B"
color: root.accentColor color: root.accentColor
font.pixelSize: M.Theme.fontSize + 8 font.pixelSize: S.Theme.fontSize + 8
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
TapHandler { TapHandler {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -284,9 +284,9 @@ Column {
Text { Text {
text: "\uF051" text: "\uF051"
color: root.player?.canGoNext ? M.Theme.base05 : M.Theme.base03 color: root.player?.canGoNext ? S.Theme.base05 : S.Theme.base03
font.pixelSize: M.Theme.fontSize + 4 font.pixelSize: S.Theme.fontSize + 4
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
TapHandler { TapHandler {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -328,8 +328,8 @@ Column {
width: _pLabel.implicitWidth + 12 width: _pLabel.implicitWidth + 12
height: 18 height: 18
radius: 9 radius: 9
color: _active ? M.Theme.base02 : (pHover.hovered ? M.Theme.base02 : "transparent") color: _active ? S.Theme.base02 : (pHover.hovered ? S.Theme.base02 : "transparent")
border.color: _active ? root.accentColor : M.Theme.base03 border.color: _active ? root.accentColor : S.Theme.base03
border.width: _active ? 1 : 0 border.width: _active ? 1 : 0
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -337,9 +337,9 @@ Column {
id: _pLabel id: _pLabel
anchors.centerIn: parent anchors.centerIn: parent
text: modelData.identity ?? "Player" text: modelData.identity ?? "Player"
color: _active ? root.accentColor : M.Theme.base04 color: _active ? root.accentColor : S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: _active font.bold: _active
} }

View file

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -14,7 +14,7 @@ Column {
property bool active: true property bool active: true
property string deviceFilter: "" property string deviceFilter: ""
property color stateColor: temp > hot ? M.Theme.base08 : temp > warm ? M.Theme.base0A : root.accentColor property color stateColor: temp > hot ? S.Theme.base08 : temp > warm ? S.Theme.base0A : root.accentColor
Behavior on stateColor { Behavior on stateColor {
ColorAnimation { ColorAnimation {
duration: 300 duration: 300
@ -23,8 +23,8 @@ Column {
function _tempColor(celsius) { function _tempColor(celsius) {
const t = Math.max(0, Math.min(100, celsius)) / 100; const t = Math.max(0, Math.min(100, celsius)) / 100;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A; const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08; const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2; const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1); return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
} }
@ -40,8 +40,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.temp + "\u00B0C" text: root.temp + "\u00B0C"
color: root.stateColor color: root.stateColor
font.pixelSize: M.Theme.fontSize font.pixelSize: S.Theme.fontSize
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: true font.bold: true
width: _tempSizer.implicitWidth width: _tempSizer.implicitWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
@ -71,7 +71,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 3 radius: 3
} }
@ -95,7 +95,7 @@ Column {
width: 1 width: 1
height: parent.height + 4 height: parent.height + 4
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: M.Theme.base0A color: S.Theme.base0A
opacity: 0.6 opacity: 0.6
} }
@ -105,7 +105,7 @@ Column {
width: 1 width: 1
height: parent.height + 4 height: parent.height + 4
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: M.Theme.base08 color: S.Theme.base08
opacity: 0.6 opacity: 0.6
} }
} }
@ -149,7 +149,7 @@ Column {
// Warm threshold line // Warm threshold line
const warmY = height - height * (root.warm / 100); const warmY = height - height * (root.warm / 100);
ctx.strokeStyle = M.Theme.base0A.toString(); ctx.strokeStyle = S.Theme.base0A.toString();
ctx.globalAlpha = 0.3; ctx.globalAlpha = 0.3;
ctx.lineWidth = 1; ctx.lineWidth = 1;
ctx.setLineDash([3, 3]); ctx.setLineDash([3, 3]);
@ -160,7 +160,7 @@ Column {
// Hot threshold line // Hot threshold line
const hotY = height - height * (root.hot / 100); const hotY = height - height * (root.hot / 100);
ctx.strokeStyle = M.Theme.base08.toString(); ctx.strokeStyle = S.Theme.base08.toString();
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(0, hotY); ctx.moveTo(0, hotY);
ctx.lineTo(width, hotY); ctx.lineTo(width, hotY);
@ -173,7 +173,7 @@ Column {
const offset = maxSamples - d.length; const offset = maxSamples - d.length;
for (let i = 0; i < d.length; i++) { for (let i = 0; i < d.length; i++) {
const barH = Math.max(1, height * d[i] / 100); const barH = Math.max(1, height * d[i] / 100);
const barColor = d[i] > root.hot ? M.Theme.base08 : d[i] > root.warm ? M.Theme.base0A : _col; const barColor = d[i] > root.hot ? S.Theme.base08 : d[i] > root.warm ? S.Theme.base0A : _col;
ctx.fillStyle = barColor.toString(); ctx.fillStyle = barColor.toString();
ctx.fillRect((offset + i) * bw, height - barH, Math.max(1, bw - 0.5), barH); ctx.fillRect((offset + i) * bw, height - barH, Math.max(1, bw - 0.5), barH);
} }
@ -190,9 +190,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "warm " + root.warm + "\u00B0 hot " + root.hot + "\u00B0" text: "warm " + root.warm + "\u00B0 hot " + root.hot + "\u00B0"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.letterSpacing: 0.5 font.letterSpacing: 0.5
} }
@ -201,9 +201,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "10 min" text: "10 min"
color: M.Theme.base03 color: S.Theme.base03
font.pixelSize: M.Theme.fontSize - 3 font.pixelSize: S.Theme.fontSize - 3
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
} }
@ -212,7 +212,7 @@ Column {
width: root.width - 16 width: root.width - 16
height: 1 height: 1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03 color: S.Theme.base03
visible: root.devices.length > 0 visible: root.devices.length > 0
} }
@ -238,9 +238,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.name text: modelData.name
color: _isActive ? root.accentColor : M.Theme.base04 color: _isActive ? root.accentColor : S.Theme.base04
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
width: parent.width - 80 width: parent.width - 80
} }
@ -251,8 +251,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.celsius + "\u00B0C" text: modelData.celsius + "\u00B0C"
color: root._tempColor(modelData.celsius) color: root._tempColor(modelData.celsius)
font.pixelSize: M.Theme.fontSize - 2 font.pixelSize: S.Theme.fontSize - 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: _isActive font.bold: _isActive
} }
} }

View file

@ -1,6 +1,6 @@
import QtQuick import QtQuick
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
import "../services" as M import "../services" as S
Column { Column {
id: root id: root
@ -13,7 +13,7 @@ Column {
property real volume: sink?.audio?.volume ?? 0 property real volume: sink?.audio?.volume ?? 0
property bool muted: sink?.audio?.muted ?? false property bool muted: sink?.audio?.muted ?? false
readonly property string volumeIcon: muted ? "\uF026" : (volume > 0.5 ? "\uF028" : (volume > 0 ? "\uF027" : "\uF026")) readonly property string volumeIcon: muted ? "\uF026" : (volume > 0.5 ? "\uF028" : (volume > 0 ? "\uF027" : "\uF026"))
readonly property color volumeColor: muted ? M.Theme.base04 : root.accentColor readonly property color volumeColor: muted ? S.Theme.base04 : root.accentColor
// Slider row // Slider row
Item { Item {
@ -27,8 +27,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.volumeIcon text: root.volumeIcon
color: root.volumeColor color: root.volumeColor
font.pixelSize: M.Theme.fontSize + 2 font.pixelSize: S.Theme.fontSize + 2
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
TapHandler { TapHandler {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -48,7 +48,7 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 3 radius: 3
} }
Rectangle { Rectangle {
@ -86,9 +86,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: Math.round(root.volume * 100) + "%" text: Math.round(root.volume * 100) + "%"
color: root.muted ? M.Theme.base04 : M.Theme.base05 color: root.muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: M.Theme.fontSize font.pixelSize: S.Theme.fontSize
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 30 width: 30
} }
} }
@ -107,7 +107,7 @@ Column {
width: parent.width - 16 width: parent.width - 16
height: 1 height: 1
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03 color: S.Theme.base03
} }
Text { Text {
@ -117,8 +117,8 @@ Column {
leftPadding: 12 leftPadding: 12
text: "Output Devices" text: "Output Devices"
color: root.accentColor color: root.accentColor
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Repeater { Repeater {
@ -136,8 +136,8 @@ Column {
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 4 anchors.leftMargin: 4
anchors.rightMargin: 4 anchors.rightMargin: 4
color: deviceHover.hovered ? M.Theme.base02 : "transparent" color: deviceHover.hovered ? S.Theme.base02 : "transparent"
radius: M.Theme.radius radius: S.Theme.radius
} }
Text { Text {
@ -147,9 +147,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.description || modelData.name || "Unknown" text: modelData.description || modelData.name || "Unknown"
color: parent._active ? root.accentColor : M.Theme.base05 color: parent._active ? root.accentColor : S.Theme.base05
font.pixelSize: M.Theme.fontSize font.pixelSize: S.Theme.fontSize
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: parent._active font.bold: parent._active
elide: Text.ElideRight elide: Text.ElideRight
} }
@ -172,7 +172,7 @@ Column {
width: parent.width - 16 width: parent.width - 16
height: visible ? 1 : 0 height: visible ? 1 : 0
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03 color: S.Theme.base03
} }
Text { Text {
@ -183,8 +183,8 @@ Column {
leftPadding: 12 leftPadding: 12
text: "Applications" text: "Applications"
color: root.accentColor color: root.accentColor
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
} }
Repeater { Repeater {
@ -207,9 +207,9 @@ Column {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: streamEntry._muted ? "\uF026" : "\uF028" text: streamEntry._muted ? "\uF026" : "\uF028"
color: streamEntry._muted ? M.Theme.base04 : M.Theme.base05 color: streamEntry._muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: M.Theme.fontSize font.pixelSize: S.Theme.fontSize
font.family: M.Theme.iconFontFamily font.family: S.Theme.iconFontFamily
TapHandler { TapHandler {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -224,9 +224,9 @@ Column {
anchors.leftMargin: 6 anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: streamEntry._appName text: streamEntry._appName
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
elide: Text.ElideRight elide: Text.ElideRight
width: 70 width: 70
} }
@ -242,13 +242,13 @@ Column {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: M.Theme.base02 color: S.Theme.base02
radius: 2 radius: 2
} }
Rectangle { Rectangle {
width: parent.width * Math.min(1, Math.max(0, streamEntry._vol)) width: parent.width * Math.min(1, Math.max(0, streamEntry._vol))
height: parent.height height: parent.height
color: streamEntry._muted ? M.Theme.base04 : root.accentColor color: streamEntry._muted ? S.Theme.base04 : root.accentColor
radius: 2 radius: 2
} }
@ -275,9 +275,9 @@ Column {
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: Math.round(streamEntry._vol * 100) + "%" text: Math.round(streamEntry._vol * 100) + "%"
color: streamEntry._muted ? M.Theme.base04 : M.Theme.base05 color: streamEntry._muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
width: 28 width: 28
} }
} }

View file

@ -2,12 +2,12 @@ import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
import Quickshell.Wayland import Quickshell.Wayland
import "../services" as M import "../services" as S
Scope { Scope {
id: root id: root
readonly property bool _enabled: M.Modules.lock.enable readonly property bool _enabled: S.Modules.lock.enable
property string _sessionPath: "" property string _sessionPath: ""
WlSessionLock { WlSessionLock {

View file

@ -1,5 +1,5 @@
import QtQuick import QtQuick
import "../services" as M import "../services" as S
Item { Item {
id: root id: root
@ -15,18 +15,18 @@ Item {
anchors.fill: parent anchors.fill: parent
color: { color: {
if (root.state === "fail" || root.state === "error") if (root.state === "fail" || root.state === "error")
return Qt.rgba(M.Theme.base08.r, M.Theme.base08.g, M.Theme.base08.b, 0.15); return Qt.rgba(S.Theme.base08.r, S.Theme.base08.g, S.Theme.base08.b, 0.15);
if (root.state === "busy") if (root.state === "busy")
return Qt.rgba(M.Theme.base0D.r, M.Theme.base0D.g, M.Theme.base0D.b, 0.1); return Qt.rgba(S.Theme.base0D.r, S.Theme.base0D.g, S.Theme.base0D.b, 0.1);
return M.Theme.base02; return S.Theme.base02;
} }
radius: height / 2 radius: height / 2
border.color: { border.color: {
if (root.state === "fail" || root.state === "error") if (root.state === "fail" || root.state === "error")
return M.Theme.base08; return S.Theme.base08;
if (root.state === "busy") if (root.state === "busy")
return M.Theme.base0D; return S.Theme.base0D;
return M.Theme.base03; return S.Theme.base03;
} }
border.width: 1 border.width: 1
@ -52,9 +52,9 @@ Item {
return "Too many attempts"; return "Too many attempts";
return "Enter password"; return "Enter password";
} }
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize font.pixelSize: S.Theme.fontSize
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
opacity: root.buffer.length === 0 ? 1 : 0 opacity: root.buffer.length === 0 ? 1 : 0
Behavior on opacity { Behavior on opacity {
@ -78,7 +78,7 @@ Item {
width: 10 width: 10
height: 10 height: 10
radius: 5 radius: 5
color: M.Theme.base05 color: S.Theme.base05
scale: 0 scale: 0
opacity: 0 opacity: 0

View file

@ -4,7 +4,7 @@ import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Services.Mpris import Quickshell.Services.Mpris
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
import "../services" as M import "../services" as S
import "../applets" as C import "../applets" as C
WlSessionLockSurface { WlSessionLockSurface {
@ -13,7 +13,7 @@ WlSessionLockSurface {
required property WlSessionLock lock required property WlSessionLock lock
required property LockAuth auth required property LockAuth auth
color: M.Theme.base00 color: S.Theme.base00
property real _bgOpacity: 0 property real _bgOpacity: 0
NumberAnimation on _bgOpacity { NumberAnimation on _bgOpacity {
@ -27,7 +27,7 @@ WlSessionLockSurface {
anchors.fill: parent anchors.fill: parent
captureSource: root.screen captureSource: root.screen
opacity: root._bgOpacity opacity: root._bgOpacity
visible: M.Modules.lock.screenshot ?? true visible: S.Modules.lock.screenshot ?? true
layer.enabled: true layer.enabled: true
layer.effect: MultiEffect { layer.effect: MultiEffect {
@ -41,7 +41,7 @@ WlSessionLockSurface {
// Dim overlay // Dim overlay
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: Qt.rgba(M.Theme.base00.r, M.Theme.base00.g, M.Theme.base00.b, 0.4) color: Qt.rgba(S.Theme.base00.r, S.Theme.base00.g, S.Theme.base00.b, 0.4)
opacity: root._bgOpacity opacity: root._bgOpacity
} }
@ -112,9 +112,9 @@ WlSessionLockSurface {
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatTime(new Date(), "HH:mm") text: Qt.formatTime(new Date(), "HH:mm")
color: M.Theme.base05 color: S.Theme.base05
font.pixelSize: 72 font.pixelSize: 72
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
font.bold: true font.bold: true
Timer { Timer {
@ -129,9 +129,9 @@ WlSessionLockSurface {
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDate(new Date(), "dddd, d MMMM") text: Qt.formatDate(new Date(), "dddd, d MMMM")
color: M.Theme.base04 color: S.Theme.base04
font.pixelSize: M.Theme.fontSize + 2 font.pixelSize: S.Theme.fontSize + 2
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
Timer { Timer {
interval: 60000 interval: 60000
@ -160,9 +160,9 @@ WlSessionLockSurface {
id: _errorText id: _errorText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: root.auth.message text: root.auth.message
color: M.Theme.base08 color: S.Theme.base08
font.pixelSize: M.Theme.fontSize - 1 font.pixelSize: S.Theme.fontSize - 1
font.family: M.Theme.fontFamily font.family: S.Theme.fontFamily
opacity: root.auth.message ? 1 : 0 opacity: root.auth.message ? 1 : 0
height: root.auth.message ? implicitHeight : 0 height: root.auth.message ? implicitHeight : 0
@ -192,11 +192,11 @@ WlSessionLockSurface {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: 280 width: 280
height: _mprisContent.implicitHeight + 16 height: _mprisContent.implicitHeight + 16
radius: M.Theme.radius + 2 radius: S.Theme.radius + 2
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7) color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3) border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
border.width: 1 border.width: 1
visible: (M.Modules.lock.mpris ?? true) && _mprisPlayer !== null visible: (S.Modules.lock.mpris ?? true) && _mprisPlayer !== null
readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused) readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
readonly property var _mprisPlayer: _mprisPlayers[0] ?? null readonly property var _mprisPlayer: _mprisPlayers[0] ?? null
@ -211,7 +211,7 @@ WlSessionLockSurface {
player: _mprisCard._mprisPlayer player: _mprisCard._mprisPlayer
players: _mprisCard._mprisPlayers players: _mprisCard._mprisPlayers
playing: _mprisCard._playing playing: _mprisCard._playing
accentColor: M.Theme.base0D accentColor: S.Theme.base0D
cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? "" cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? ""
} }
} }
@ -222,11 +222,11 @@ WlSessionLockSurface {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: 280 width: 280
height: _volumeContent.implicitHeight + 16 height: _volumeContent.implicitHeight + 16
radius: M.Theme.radius + 2 radius: S.Theme.radius + 2
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7) color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3) border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
border.width: 1 border.width: 1
visible: (M.Modules.lock.volume ?? true) && Pipewire.defaultAudioSink !== null visible: (S.Modules.lock.volume ?? true) && Pipewire.defaultAudioSink !== null
PwObjectTracker { PwObjectTracker {
objects: [Pipewire.defaultAudioSink] objects: [Pipewire.defaultAudioSink]
@ -241,7 +241,7 @@ WlSessionLockSurface {
sink: Pipewire.defaultAudioSink sink: Pipewire.defaultAudioSink
sinkList: [] sinkList: []
streamList: [] streamList: []
accentColor: M.Theme.base0E accentColor: S.Theme.base0E
} }
} }
} }
@ -354,8 +354,8 @@ WlSessionLockSurface {
// so the bar's ScreenCorners aren't visible. Draw our own. // so the bar's ScreenCorners aren't visible. Draw our own.
component LockCorner: Canvas { component LockCorner: Canvas {
property int corner: 0 property int corner: 0
readonly property int _r: M.Theme.screenRadius readonly property int _r: S.Theme.screenRadius
visible: _r > 0 && M.Modules.screenCorners.enable visible: _r > 0 && S.Modules.screenCorners.enable
width: _r width: _r
height: _r height: _r
z: 999 z: 999