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