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