Merge branch 'main' into module/wifi
C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 17s
JS/TS / lint (pull_request) Successful in 16s
Python / fmt (pull_request) Successful in 31s
Python / lint (pull_request) Successful in 41s
Python / test (pull_request) Successful in 1m5s
Python / typecheck (pull_request) Successful in 1m15s
Rust / clippy (pull_request) Failing after 12m43s
Rust / fmt (pull_request) Failing after 12m57s
Rust / build (pull_request) Failing after 13m33s
Python / buildcheck (pull_request) Failing after 13m45s
C++ / clang-tidy (pull_request) Failing after 14m23s
C++ / build (pull_request) Failing after 14m25s
C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 17s
JS/TS / lint (pull_request) Successful in 16s
Python / fmt (pull_request) Successful in 31s
Python / lint (pull_request) Successful in 41s
Python / test (pull_request) Successful in 1m5s
Python / typecheck (pull_request) Successful in 1m15s
Rust / clippy (pull_request) Failing after 12m43s
Rust / fmt (pull_request) Failing after 12m57s
Rust / build (pull_request) Failing after 13m33s
Python / buildcheck (pull_request) Failing after 13m45s
C++ / clang-tidy (pull_request) Failing after 14m23s
C++ / build (pull_request) Failing after 14m25s
This commit is contained in:
@@ -6,34 +6,33 @@ import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Daemons
|
||||
import qs.Helpers
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int rounding: Appearance.rounding.small - Appearance.padding.small
|
||||
readonly property int rounding: Tokens.rounding.small - Tokens.padding.small
|
||||
readonly property int topMargin: 0
|
||||
required property var wrapper
|
||||
|
||||
implicitHeight: vol.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: 500 + Appearance.padding.small * 2
|
||||
implicitHeight: vol.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: 500 + Tokens.padding.small * 2
|
||||
|
||||
CustomRect {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: parent.implicitHeight
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
y: parent.y
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +41,7 @@ Item {
|
||||
id: vol
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Appearance.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -52,17 +51,17 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Appearance.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Appearance.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.larger
|
||||
anchors.rightMargin: Appearance.padding.larger
|
||||
anchors.topMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -76,27 +75,27 @@ Item {
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(DynamicColors.palette.m3onSurface, 0.7)
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
text: qsTr("%1").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`)
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.large
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Appearance.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
bgColor: Audio.muted ? Qt.alpha(DynamicColors.palette.m3errorContainer, 0.5) : DynamicColors.palette.m3secondaryContainer
|
||||
fgColor: Audio.muted ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||
bgColor: Audio.muted ? Qt.alpha(Colors.palette.m3errorContainer, 0.5) : Colors.palette.m3secondaryContainer
|
||||
fgColor: Audio.muted ? Colors.palette.m3error : Colors.palette.m3primary
|
||||
implicitHeight: parent.height
|
||||
insetColor: Audio.muted ? (inset.attached ? DynamicColors.palette.m3onErrorContainer : DynamicColors.palette.m3onError) : (inset.attached ? DynamicColors.palette.m3onSecondaryContainer : DynamicColors.palette.m3onPrimary)
|
||||
insetColor: Audio.muted ? (inset.attached ? Colors.palette.m3onErrorContainer : Colors.palette.m3onError) : (inset.attached ? Colors.palette.m3onSecondaryContainer : Colors.palette.m3onPrimary)
|
||||
insetIcon: Audio.muted || Audio.volume < 0.001 ? "volume_off" : "volume_up"
|
||||
value: Audio.volume
|
||||
|
||||
@@ -110,7 +109,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
checked: !Audio.muted
|
||||
|
||||
onToggled: {
|
||||
@@ -125,9 +124,9 @@ Item {
|
||||
|
||||
CustomClippingRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Appearance.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
|
||||
PwNodePeakMonitor {
|
||||
@@ -142,22 +141,21 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(DynamicColors.palette.m3primary, 0.15)
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * sourcePeak.peak
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Appearance.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.larger
|
||||
anchors.rightMargin: Appearance.padding.larger
|
||||
anchors.topMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -171,27 +169,27 @@ Item {
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(DynamicColors.palette.m3onSurface, 0.7)
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
text: qsTr("%1").arg(Audio.sourceMuted ? qsTr("Muted") : `${Math.round(Audio.sourceVolume * 100)}%`)
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.large
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Appearance.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
bgColor: Audio.sourceMuted ? Qt.alpha(DynamicColors.palette.m3errorContainer, 0.5) : DynamicColors.palette.m3secondaryContainer
|
||||
fgColor: Audio.sourceMuted ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||
bgColor: Audio.sourceMuted ? Qt.alpha(Colors.palette.m3errorContainer, 0.5) : Colors.palette.m3secondaryContainer
|
||||
fgColor: Audio.sourceMuted ? Colors.palette.m3error : Colors.palette.m3primary
|
||||
implicitHeight: parent.height
|
||||
insetColor: Audio.sourceMuted ? (inset.attached ? DynamicColors.palette.m3onErrorContainer : DynamicColors.palette.m3onError) : (inset.attached ? DynamicColors.palette.m3onSecondaryContainer : DynamicColors.palette.m3onPrimary)
|
||||
insetColor: Audio.sourceMuted ? (inset.attached ? Colors.palette.m3onErrorContainer : Colors.palette.m3onError) : (inset.attached ? Colors.palette.m3onSecondaryContainer : Colors.palette.m3onPrimary)
|
||||
insetIcon: Audio.sourceMuted || Audio.sourceVolume < 0.001 ? "mic_off" : "mic"
|
||||
value: Audio.sourceVolume
|
||||
|
||||
@@ -205,7 +203,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
checked: !Audio.sourceMuted
|
||||
|
||||
onToggled: {
|
||||
@@ -222,7 +220,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
Layout.topMargin: root.topMargin
|
||||
color: DynamicColors.tPalette.m3outline
|
||||
color: Colors.tPalette.m3outline
|
||||
visible: appTracks.model.length > 0
|
||||
}
|
||||
|
||||
@@ -238,9 +236,9 @@ Item {
|
||||
required property var modelData
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Appearance.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
|
||||
PwNodePeakMonitor {
|
||||
@@ -255,12 +253,11 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
color: Qt.alpha(DynamicColors.palette.m3primary, 0.15)
|
||||
color: Qt.alpha(Colors.palette.m3primary, 0.15)
|
||||
implicitWidth: parent.width * peak.peak
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -274,11 +271,11 @@ Item {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Appearance.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.larger
|
||||
anchors.rightMargin: Appearance.padding.larger
|
||||
anchors.topMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -293,27 +290,27 @@ Item {
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: Qt.alpha(DynamicColors.palette.m3onSurface, 0.7)
|
||||
color: Qt.alpha(Colors.palette.m3onSurface, 0.7)
|
||||
font.bold: true
|
||||
text: qsTr("%1").arg(appBox.modelData.audio.muted ? qsTr("Muted") : `${Math.round(appBox.modelData.audio.volume * 100)}%`)
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.large
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Appearance.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
bgColor: appBox.modelData.audio.muted ? Qt.alpha(DynamicColors.palette.m3errorContainer, 0.5) : DynamicColors.palette.m3secondaryContainer
|
||||
fgColor: appBox.modelData.audio.muted ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||
bgColor: appBox.modelData.audio.muted ? Qt.alpha(Colors.palette.m3errorContainer, 0.5) : Colors.palette.m3secondaryContainer
|
||||
fgColor: appBox.modelData.audio.muted ? Colors.palette.m3error : Colors.palette.m3primary
|
||||
implicitHeight: parent.height
|
||||
insetColor: appBox.modelData.audio.muted ? (inset.attached ? DynamicColors.palette.m3onErrorContainer : DynamicColors.palette.m3onError) : (inset.attached ? DynamicColors.palette.m3onSecondaryContainer : DynamicColors.palette.m3onPrimary)
|
||||
insetColor: appBox.modelData.audio.muted ? (inset.attached ? Colors.palette.m3onErrorContainer : Colors.palette.m3onError) : (inset.attached ? Colors.palette.m3onSecondaryContainer : Colors.palette.m3onPrimary)
|
||||
insetIcon: appBox.modelData.audio.muted || appBox.modelData.audio.volume < 0.001 ? "volume_off" : "volume_up"
|
||||
value: appBox.modelData.audio.volume
|
||||
|
||||
@@ -327,7 +324,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Appearance.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
checked: !appBox.modelData.audio.muted
|
||||
|
||||
onToggled: {
|
||||
|
||||
@@ -6,9 +6,10 @@ import QtQml.Models
|
||||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import ZShell.Components
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
|
||||
CustomClippingRect {
|
||||
id: root
|
||||
@@ -20,13 +21,13 @@ CustomClippingRect {
|
||||
id: layout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.larger
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
anchors.margins: Tokens.padding.larger
|
||||
spacing: Tokens.spacing.extraSmall / 2
|
||||
|
||||
CustomText {
|
||||
Layout.rightMargin: Appearance.padding.extraSmall
|
||||
Layout.topMargin: Appearance.padding.normal
|
||||
font.pointSize: Appearance.font.size.large
|
||||
Layout.rightMargin: Tokens.padding.extraSmall
|
||||
Layout.topMargin: Tokens.padding.normal
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: qsTr("Bluetooth")
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ CustomClippingRect {
|
||||
Layout.preferredHeight: contentHeight
|
||||
interactive: false
|
||||
section.property: "connected"
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
spacing: Tokens.spacing.extraSmall / 2
|
||||
|
||||
add: Transition {
|
||||
Anim {
|
||||
@@ -142,19 +143,19 @@ CustomClippingRect {
|
||||
|
||||
readonly property int connectedCount: rows.sortedConnected.length
|
||||
readonly property bool connecting: Network.connectingNetwork === modelData
|
||||
property int horizontalPadding: Appearance.padding.largeIncreased
|
||||
property int horizontalPadding: Tokens.padding.largeIncreased
|
||||
readonly property bool inConnectedGroup: index < connectedCount
|
||||
required property int index
|
||||
required property ListView list
|
||||
readonly property bool loading: modelData.state === BluetoothDeviceState.Connecting || modelData.state === BluetoothDeviceState.Disconnecting // qmllint disable unresolved-type
|
||||
|
||||
required property BluetoothDevice modelData
|
||||
property int verticalPadding: Appearance.padding.smaller
|
||||
property int verticalPadding: Tokens.padding.smaller
|
||||
|
||||
first: !inConnectedGroup && index === connectedCount + 1
|
||||
implicitHeight: rowLayout.implicitHeight + verticalPadding * 2
|
||||
last: inConnectedGroup ? index === connectedCount - 1 : index === list.count - 1
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
Timer {
|
||||
interval: 50
|
||||
@@ -191,8 +192,8 @@ CustomClippingRect {
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Appearance.spacing.extraSmall
|
||||
Layout.rightMargin: Appearance.spacing.extraSmall
|
||||
Layout.leftMargin: Tokens.spacing.extraSmall
|
||||
Layout.rightMargin: Tokens.spacing.extraSmall
|
||||
elide: Text.ElideRight
|
||||
text: btItem.modelData.name
|
||||
}
|
||||
@@ -202,9 +203,9 @@ CustomClippingRect {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: DynamicColors.palette.m3outline
|
||||
color: Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: btItem.modelData.connected ? (btItem.modelData.batteryAvailable ? qsTr("%1 battery left").arg(Math.round(btItem.modelData.battery * 100) + "%") : qsTr("Battery status unknown")) : btItem.modelData.address
|
||||
}
|
||||
}
|
||||
@@ -217,7 +218,7 @@ CustomClippingRect {
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
opacity: btItem.connecting ? 0 : 1
|
||||
text: btItem.modelData.batteryAvailable ? Icons.getBatteryIcon(btItem.modelData.battery) : "battery_unknown"
|
||||
visible: btItem.modelData.state === BluetoothDeviceState.Connected // qmllint disable unresolved-type
|
||||
@@ -245,10 +246,10 @@ CustomClippingRect {
|
||||
}
|
||||
|
||||
ButtonRow {
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
IconTextButton {
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
icon: btItem.modelData.connected ? "link_off" : btItem.modelData.paired ? "link" : "add_link"
|
||||
text: btItem.modelData.connected ? qsTr("Disconnect") : btItem.modelData.paired ? qsTr("Connect") : qsTr("Pair")
|
||||
|
||||
@@ -272,11 +273,11 @@ CustomClippingRect {
|
||||
property bool first
|
||||
property bool last
|
||||
|
||||
bottomLeftRadius: last ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
bottomRightRadius: last ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
topLeftRadius: first ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
topRightRadius: first ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
bottomLeftRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
bottomRightRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
topLeftRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
topRightRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
|
||||
Behavior on bottomLeftRadius {
|
||||
Anim {
|
||||
@@ -296,16 +297,16 @@ CustomClippingRect {
|
||||
}
|
||||
}
|
||||
component StatusDivider: CustomText {
|
||||
bottomPadding: Appearance.spacing.extraSmall
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
bottomPadding: Tokens.spacing.extraSmall
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
text: {
|
||||
const devices = Bluetooth.devices.values; // qmllint disable unresolved-type
|
||||
const connectedCount = devices.filter(d => d.connected).length;
|
||||
let available = qsTr("%1 device%2 available").arg(devices.length - connectedCount).arg(devices.length === 1 ? "" : "s");
|
||||
return available;
|
||||
}
|
||||
topPadding: Appearance.spacing.small
|
||||
topPadding: Tokens.spacing.small
|
||||
}
|
||||
component Toggle: CustomSwitch {
|
||||
id: toggleItem
|
||||
@@ -317,13 +318,13 @@ CustomClippingRect {
|
||||
|
||||
Layout.fillWidth: true
|
||||
cLayer: 2
|
||||
horizontalPadding: Appearance.padding.largeIncreased
|
||||
horizontalPadding: Tokens.padding.largeIncreased
|
||||
implicitHeight: Math.max(implicitContentHeight, implicitIndicatorHeight) + verticalPadding * 2
|
||||
implicitWidth: implicitContentWidth + implicitIndicatorWidth + horizontalPadding * 2
|
||||
indicator.anchors.right: right
|
||||
indicator.anchors.rightMargin: toggleItem.horizontalPadding
|
||||
indicator.anchors.verticalCenter: verticalCenter
|
||||
verticalPadding: Appearance.padding.normal
|
||||
verticalPadding: Tokens.padding.normal
|
||||
|
||||
background: ConnectedRect {
|
||||
id: bg
|
||||
@@ -338,7 +339,7 @@ CustomClippingRect {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: toggleItem.horizontalPadding
|
||||
anchors.right: toggleItem.indicator.left
|
||||
anchors.rightMargin: Appearance.spacing.normal
|
||||
anchors.rightMargin: Tokens.spacing.normal
|
||||
implicitHeight: column.implicitHeight
|
||||
implicitWidth: column.implicitWidth
|
||||
|
||||
@@ -358,7 +359,7 @@ CustomClippingRect {
|
||||
elide: Text.ElideRight
|
||||
font: {
|
||||
const f = Qt.font(label.font);
|
||||
f.pointSize = Appearance.font.size.smaller;
|
||||
f.pointSize = Tokens.font.size.smaller;
|
||||
return f;
|
||||
}
|
||||
text: toggleItem.text
|
||||
@@ -369,11 +370,11 @@ CustomClippingRect {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: DynamicColors.palette.m3outline
|
||||
color: Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
font: {
|
||||
const f = Qt.font(subtext.font);
|
||||
f.pointSize = Appearance.font.size.small;
|
||||
f.pointSize = Tokens.font.size.small;
|
||||
return f;
|
||||
}
|
||||
text: toggleItem.subtext
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
|
||||
CustomRect {
|
||||
@@ -10,7 +11,7 @@ CustomRect {
|
||||
readonly property url currentPopup: PopupManager.currentPopup
|
||||
property bool shouldBeVisible: loader.status === Loader.Ready
|
||||
|
||||
color: Qt.alpha(DynamicColors.palette.m3shadow, 0.3)
|
||||
color: Qt.alpha(Colors.palette.m3shadow, 0.3)
|
||||
opacity: shouldBeVisible && !closing ? 1 : 0
|
||||
visible: opacity > 0
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
|
||||
@@ -11,27 +12,27 @@ CustomClippingRect {
|
||||
|
||||
required property var network
|
||||
|
||||
color: DynamicColors.palette.m3surfaceContainer
|
||||
color: Colors.palette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + layout.anchors.margins * 2
|
||||
implicitWidth: layout.implicitWidth + layout.anchors.margins * 2
|
||||
radius: Appearance.rounding.large
|
||||
radius: Tokens.rounding.large
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.extraLarge
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.margins: Tokens.padding.extraLarge
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pointSize: Appearance.font.size.extraLarge * 2
|
||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
||||
text: "lock"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
text: qsTr("Connect to %1").arg(root.network.name)
|
||||
}
|
||||
|
||||
@@ -52,14 +53,14 @@ CustomClippingRect {
|
||||
id: buttonRow
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.smaller
|
||||
spacing: Tokens.spacing.smaller
|
||||
|
||||
IconTextButton {
|
||||
fillWidth: true
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
icon: "close"
|
||||
inactiveColor: DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHighest, 2)
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurfaceVariant
|
||||
inactiveColor: Colors.layer(Colors.palette.m3surfaceContainerHighest, 2)
|
||||
inactiveOnColor: Colors.palette.m3onSurfaceVariant
|
||||
isRound: true
|
||||
isToggle: false
|
||||
shapeMorph: true
|
||||
@@ -70,10 +71,10 @@ CustomClippingRect {
|
||||
|
||||
IconTextButton {
|
||||
fillWidth: true
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
icon: Network.connectingNetwork ? "" : "check"
|
||||
inactiveColor: Network.connectingNetwork ? DynamicColors.palette.m3primaryContainer : Network.failedNetwork ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||
inactiveOnColor: Network.connectingNetwork ? DynamicColors.palette.m3onPrimaryContainer : Network.failedNetwork ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onPrimary
|
||||
inactiveColor: Network.connectingNetwork ? Colors.palette.m3primaryContainer : Network.failedNetwork ? Colors.palette.m3error : Colors.palette.m3primary
|
||||
inactiveOnColor: Network.connectingNetwork ? Colors.palette.m3onPrimaryContainer : Network.failedNetwork ? Colors.palette.m3onError : Colors.palette.m3onPrimary
|
||||
isRound: true
|
||||
isToggle: false
|
||||
shapeMorph: true
|
||||
@@ -92,7 +93,7 @@ CustomClippingRect {
|
||||
}
|
||||
sourceComponent: CircularIndicator {
|
||||
bgColor: "transparent"
|
||||
implicitSize: buttonRow.height - Appearance.padding.normal
|
||||
implicitSize: buttonRow.height - Tokens.padding.normal
|
||||
running: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Modules.SysTray.Popouts.Network
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
|
||||
CustomClippingRect {
|
||||
@@ -16,7 +17,7 @@ CustomClippingRect {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
implicitHeight: networkPopContent.height + networks.implicitHeight + networkPopContent.anchors.margins + networks.anchors.margins * 2
|
||||
implicitWidth: 500 + 8 * 2
|
||||
radius: (20 - Appearance.padding.small) * Appearance.rounding.scale
|
||||
radius: (20 - Tokens.padding.small) * Tokens.rounding.scale
|
||||
|
||||
Component.onCompleted: Network.active = true
|
||||
Component.onDestruction: Network.active = false
|
||||
@@ -25,15 +26,15 @@ CustomClippingRect {
|
||||
id: networkPopContent
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
spacing: Tokens.spacing.extraSmall / 2
|
||||
|
||||
CustomText {
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.rightMargin: Appearance.padding.extraSmall
|
||||
font.pointSize: Appearance.font.size.large
|
||||
Layout.rightMargin: Tokens.padding.extraSmall
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: qsTr("Wifi")
|
||||
}
|
||||
|
||||
@@ -72,10 +73,10 @@ CustomClippingRect {
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.right: parent.right
|
||||
anchors.top: networkPopContent.bottom
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
spacing: Tokens.spacing.extraSmall / 2
|
||||
|
||||
Spacer {
|
||||
repeater: known
|
||||
@@ -83,10 +84,10 @@ CustomClippingRect {
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.leftMargin: Appearance.padding.normal
|
||||
Layout.leftMargin: Tokens.padding.normal
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: Network.knownNetworks.length > 1 ? qsTr("%1 known networks available").arg(Network.knownNetworks.length) : qsTr("1 known network available") // qmllint disable missing-property
|
||||
visible: Network.knownNetworks.length > 0
|
||||
}
|
||||
@@ -114,10 +115,10 @@ CustomClippingRect {
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.leftMargin: Appearance.padding.normal
|
||||
Layout.leftMargin: Tokens.padding.normal
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: Network.unknownNetworks.length > 1 ? qsTr("%1 networks available").arg(Network.unknownNetworks.length) : qsTr("1 network available") // qmllint disable missing-property
|
||||
visible: Network.unknownNetworks.length > 0
|
||||
}
|
||||
@@ -148,17 +149,17 @@ CustomClippingRect {
|
||||
property bool first
|
||||
property bool last
|
||||
|
||||
bottomLeftRadius: last ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
bottomRightRadius: last ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
topLeftRadius: first ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
topRightRadius: first ? Appearance.rounding.large : Appearance.rounding.extraSmall
|
||||
bottomLeftRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
bottomRightRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
topLeftRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
topRightRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
}
|
||||
component NetworkItem: ConnectedRect {
|
||||
id: networkItem
|
||||
|
||||
readonly property bool connecting: Network.connectingNetwork === modelData
|
||||
property int horizontalPadding: Appearance.padding.largeIncreased
|
||||
property int horizontalPadding: Tokens.padding.largeIncreased
|
||||
required property int index
|
||||
readonly property bool isSecure: Network.isSecure(modelData.security)
|
||||
required property bool known
|
||||
@@ -166,10 +167,10 @@ CustomClippingRect {
|
||||
required property Repeater repeater
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: visible ? rowLayout.implicitHeight + Appearance.padding.smaller * 2 : 0
|
||||
Layout.preferredHeight: visible ? rowLayout.implicitHeight + Tokens.padding.smaller * 2 : 0
|
||||
first: index === 0
|
||||
last: index === (repeater.count - 1)
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
@@ -185,9 +186,9 @@ CustomClippingRect {
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Appearance.spacing.extraSmall
|
||||
Layout.rightMargin: Appearance.spacing.extraSmall
|
||||
color: networkItem.modelData.active ? DynamicColors.palette.m3primary : DynamicColors.palette.m3onSurface
|
||||
Layout.leftMargin: Tokens.spacing.extraSmall
|
||||
Layout.rightMargin: Tokens.spacing.extraSmall
|
||||
color: networkItem.modelData.active ? Colors.palette.m3primary : Colors.palette.m3onSurface
|
||||
elide: Text.ElideRight
|
||||
text: networkItem.modelData.name
|
||||
}
|
||||
@@ -197,9 +198,9 @@ CustomClippingRect {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: DynamicColors.palette.m3outline
|
||||
color: Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: qsTr("%1 strength").arg(Math.round(networkItem.modelData.signalStrength * 100) + "%")
|
||||
}
|
||||
}
|
||||
@@ -212,8 +213,8 @@ CustomClippingRect {
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
color: networkItem.modelData.active ? DynamicColors.palette.m3primary : DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.large
|
||||
color: networkItem.modelData.active ? Colors.palette.m3primary : Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.large
|
||||
opacity: networkItem.connecting ? 0 : 1
|
||||
text: Icons.getNetworkIcon(networkItem.modelData.signalStrength * 100, networkItem.isSecure)
|
||||
|
||||
@@ -241,7 +242,7 @@ CustomClippingRect {
|
||||
}
|
||||
|
||||
StateLayer {
|
||||
color: networkItem.modelData.active ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: networkItem.modelData.active ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
|
||||
onClicked: {
|
||||
if (networkItem.isSecure && !networkItem.known) {
|
||||
@@ -259,7 +260,7 @@ CustomClippingRect {
|
||||
|
||||
required property Repeater repeater
|
||||
|
||||
Layout.preferredHeight: repeater.count > 0 ? Appearance.spacing.extraSmall : 0
|
||||
Layout.preferredHeight: repeater.count > 0 ? Tokens.spacing.extraSmall : 0
|
||||
}
|
||||
component Toggle: CustomSwitch {
|
||||
id: toggleItem
|
||||
@@ -271,13 +272,13 @@ CustomClippingRect {
|
||||
|
||||
Layout.fillWidth: true
|
||||
cLayer: 2
|
||||
horizontalPadding: Appearance.padding.largeIncreased
|
||||
horizontalPadding: Tokens.padding.largeIncreased
|
||||
implicitHeight: Math.max(implicitContentHeight, implicitIndicatorHeight) + verticalPadding * 2
|
||||
implicitWidth: implicitContentWidth + implicitIndicatorWidth + horizontalPadding * 2
|
||||
indicator.anchors.right: right
|
||||
indicator.anchors.rightMargin: toggleItem.horizontalPadding
|
||||
indicator.anchors.verticalCenter: verticalCenter
|
||||
verticalPadding: Appearance.padding.normal
|
||||
verticalPadding: Tokens.padding.normal
|
||||
|
||||
background: ConnectedRect {
|
||||
id: bg
|
||||
@@ -292,7 +293,7 @@ CustomClippingRect {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: toggleItem.horizontalPadding
|
||||
anchors.right: toggleItem.indicator.left
|
||||
anchors.rightMargin: Appearance.spacing.normal
|
||||
anchors.rightMargin: Tokens.spacing.normal
|
||||
implicitHeight: column.implicitHeight
|
||||
implicitWidth: column.implicitWidth
|
||||
|
||||
@@ -312,7 +313,7 @@ CustomClippingRect {
|
||||
elide: Text.ElideRight
|
||||
font: {
|
||||
const f = Qt.font(label.font);
|
||||
f.pointSize = Appearance.font.size.smaller;
|
||||
f.pointSize = Tokens.font.size.smaller;
|
||||
return f;
|
||||
}
|
||||
text: toggleItem.text
|
||||
@@ -323,11 +324,11 @@ CustomClippingRect {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: DynamicColors.palette.m3outline
|
||||
color: Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
font: {
|
||||
const f = Qt.font(subtext.font);
|
||||
f.pointSize = Appearance.font.size.small;
|
||||
f.pointSize = Tokens.font.size.small;
|
||||
return f;
|
||||
}
|
||||
text: toggleItem.subtext
|
||||
|
||||
@@ -8,13 +8,14 @@ import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import qs.Components
|
||||
import qs.Modules
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
StackView {
|
||||
id: root
|
||||
|
||||
readonly property int itemHeight: 30
|
||||
readonly property int panelRadius: ((itemHeight / 2) + Appearance.padding.small) * Appearance.rounding.scale
|
||||
readonly property int panelRadius: ((itemHeight / 2) + Tokens.padding.small) * Tokens.rounding.scale
|
||||
required property PopoutState popouts
|
||||
property int rootWidth: 0
|
||||
required property QsMenuHandle trayItem
|
||||
@@ -55,7 +56,7 @@ StackView {
|
||||
|
||||
opacity: shown ? 1 : 0
|
||||
scale: shown ? 1 : 0.8
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
@@ -87,12 +88,12 @@ StackView {
|
||||
required property QsMenuEntry modelData
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: modelData.isSeparator ? Appearance.padding.normal : 0
|
||||
Layout.rightMargin: modelData.isSeparator ? Appearance.padding.normal : 0
|
||||
color: modelData.isSeparator ? DynamicColors.palette.m3outlineVariant : "transparent"
|
||||
Layout.leftMargin: modelData.isSeparator ? Tokens.padding.normal : 0
|
||||
Layout.rightMargin: modelData.isSeparator ? Tokens.padding.normal : 0
|
||||
color: modelData.isSeparator ? Colors.palette.m3outlineVariant : "transparent"
|
||||
implicitHeight: modelData.isSeparator ? (visible ? 1 : 0) : childrenLoader.item.implicitHeight
|
||||
implicitWidth: childrenLoader.item?.implicitWidth ?? 0
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
visible: index !== (menuOpener.children.values.length - 1) ? true : (modelData.isSeparator ? false : true)
|
||||
|
||||
Loader {
|
||||
@@ -103,7 +104,7 @@ StackView {
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: Item {
|
||||
property int iconWidth: icon.active ? icon.width + Appearance.spacing.normal + icon.anchors.rightMargin : 0
|
||||
property int iconWidth: icon.active ? icon.width + Tokens.spacing.normal + icon.anchors.rightMargin : 0
|
||||
|
||||
implicitHeight: root.itemHeight
|
||||
implicitWidth: label.width + label.anchors.leftMargin * 2 + iconWidth + (expand.item?.width ?? 0)
|
||||
@@ -150,7 +151,7 @@ StackView {
|
||||
MultiEffect {
|
||||
anchors.fill: iconImage
|
||||
colorization: 1.0
|
||||
colorizationColor: item.modelData.enabled ? DynamicColors.palette.m3onSurface : DynamicColors.palette.m3outline
|
||||
colorizationColor: item.modelData.enabled ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
source: iconImage
|
||||
}
|
||||
}
|
||||
@@ -162,7 +163,7 @@ StackView {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: item.modelData.enabled ? DynamicColors.palette.m3onSurface : DynamicColors.palette.m3outline
|
||||
color: item.modelData.enabled ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
text: item.modelData.text
|
||||
}
|
||||
|
||||
@@ -175,7 +176,7 @@ StackView {
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: MaterialIcon {
|
||||
color: item.modelData.enabled ? DynamicColors.palette.m3onSurface : DynamicColors.palette.m3outline
|
||||
color: item.modelData.enabled ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
text: "chevron_right"
|
||||
}
|
||||
}
|
||||
@@ -201,11 +202,11 @@ StackView {
|
||||
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
color: DynamicColors.palette.m3secondaryContainer
|
||||
radius: Appearance.rounding.full
|
||||
color: Colors.palette.m3secondaryContainer
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StateLayer {
|
||||
color: DynamicColors.palette.m3onSecondaryContainer
|
||||
color: Colors.palette.m3onSecondaryContainer
|
||||
radius: parent.radius
|
||||
|
||||
onClicked: {
|
||||
@@ -221,13 +222,13 @@ StackView {
|
||||
|
||||
MaterialIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: DynamicColors.palette.m3onSecondaryContainer
|
||||
color: Colors.palette.m3onSecondaryContainer
|
||||
text: "chevron_left"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: DynamicColors.palette.m3onSecondaryContainer
|
||||
color: Colors.palette.m3onSecondaryContainer
|
||||
text: qsTr("Back")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,17 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell.Services.UPower
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Helpers
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
Column {
|
||||
id: root
|
||||
|
||||
readonly property int panelRadius: ((profiles.height / 2) + Appearance.padding.small) * Appearance.rounding.scale
|
||||
readonly property int panelRadius: ((profiles.height / 2) + Tokens.padding.small) * Tokens.rounding.scale
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
Loader {
|
||||
active: Battery.isLaptop
|
||||
@@ -39,7 +40,7 @@ Column {
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
text: Battery.isLaptop ? qsTr("Time %1: %2").arg(Battery.onBattery ? "remaining" : "until charged").arg(Battery.onBattery ? formatSeconds(Battery.timeToEmpty, "Calculating...") : formatSeconds(Battery.timeToFull, "Fully charged!")) : qsTr("Power profile: %1").arg(PowerProfile.toString(PowerProfiles.profile))
|
||||
}
|
||||
|
||||
@@ -50,10 +51,10 @@ Column {
|
||||
height: active ? ((item as Item)?.implicitHeight ?? 0) : 0
|
||||
|
||||
sourceComponent: CustomRect {
|
||||
color: DynamicColors.palette.m3error
|
||||
implicitHeight: child.implicitHeight + Appearance.padding.large
|
||||
implicitWidth: child.implicitWidth + Appearance.padding.larger * 2
|
||||
radius: Appearance.rounding.large
|
||||
color: Colors.palette.m3error
|
||||
implicitHeight: child.implicitHeight + Tokens.padding.large
|
||||
implicitWidth: child.implicitWidth + Tokens.padding.larger * 2
|
||||
radius: Tokens.rounding.large
|
||||
|
||||
Column {
|
||||
id: child
|
||||
@@ -62,18 +63,18 @@ Column {
|
||||
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: -font.pointSize / 10
|
||||
color: DynamicColors.palette.m3onError
|
||||
color: Colors.palette.m3onError
|
||||
text: "warning"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: DynamicColors.palette.m3onError
|
||||
color: Colors.palette.m3onError
|
||||
font.family: Appearance.font.family.mono
|
||||
text: qsTr("Performance Degraded")
|
||||
}
|
||||
@@ -81,14 +82,14 @@ Column {
|
||||
MaterialIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: -font.pointSize / 10
|
||||
color: DynamicColors.palette.m3onError
|
||||
color: Colors.palette.m3onError
|
||||
text: "warning"
|
||||
}
|
||||
}
|
||||
|
||||
CustomText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: DynamicColors.palette.m3onError
|
||||
color: Colors.palette.m3onError
|
||||
text: qsTr("Reason: %1").arg(PerformanceDegradationReason.toString(PowerProfiles.degradationReason))
|
||||
}
|
||||
}
|
||||
@@ -108,16 +109,16 @@ Column {
|
||||
}
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: indicator.height + Appearance.padding.extraSmall * 2
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Appearance.padding.larger * 2 + Appearance.spacing.small * 8
|
||||
radius: Appearance.rounding.full
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: indicator.height + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Tokens.padding.larger * 2 + Tokens.spacing.small * 8
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
CustomRect {
|
||||
id: indicator
|
||||
|
||||
color: DynamicColors.palette.m3primary
|
||||
radius: Appearance.rounding.full
|
||||
color: Colors.palette.m3primary
|
||||
radius: Tokens.rounding.full
|
||||
state: profiles.current
|
||||
|
||||
states: [
|
||||
@@ -153,7 +154,7 @@ Column {
|
||||
id: saver
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Appearance.padding.extraSmall
|
||||
anchors.leftMargin: Tokens.padding.extraSmall
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon: "energy_savings_leaf"
|
||||
profile: PowerProfile.PowerSaver
|
||||
@@ -171,7 +172,7 @@ Column {
|
||||
id: perf
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Appearance.padding.extraSmall
|
||||
anchors.rightMargin: Tokens.padding.extraSmall
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon: "bolt"
|
||||
profile: PowerProfile.Performance
|
||||
@@ -191,12 +192,12 @@ Column {
|
||||
required property string icon
|
||||
required property int profile
|
||||
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small
|
||||
implicitWidth: icon.implicitHeight + Appearance.padding.small
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small
|
||||
|
||||
StateLayer {
|
||||
color: profiles.current === parent.icon ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
radius: Appearance.rounding.full
|
||||
color: profiles.current === parent.icon ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
onClicked: {
|
||||
PowerProfiles.profile = parent.profile;
|
||||
@@ -207,10 +208,10 @@ Column {
|
||||
id: icon
|
||||
|
||||
anchors.centerIn: parent
|
||||
color: profiles.current === text ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: profiles.current === text ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
fill: profiles.current === text ? 1 : 0
|
||||
font.pointSize: Appearance.font.size.large * 2
|
||||
grade: DynamicColors.light ? 0 : (text === "balance" ? -25 : 0)
|
||||
font.pointSize: Tokens.font.size.large * 2
|
||||
grade: Colors.light ? 0 : (text === "balance" ? -25 : 0)
|
||||
text: parent.icon
|
||||
|
||||
Behavior on fill {
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Helpers
|
||||
import qs.Modules.SysTray.Widgets
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
CustomClippingRect {
|
||||
id: root
|
||||
|
||||
readonly property int firstPresent: {
|
||||
const values = model.values;
|
||||
for (let i = 0; i < values.length; i++)
|
||||
if (!collapsed(values[i]))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Index of the first/last entry that isn't collapsed, for edge margin gating
|
||||
readonly property alias items: row
|
||||
readonly property int lastPresent: {
|
||||
const values = model.values;
|
||||
for (let i = values.length - 1; i >= 0; i--)
|
||||
if (!collapsed(values[i]))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
readonly property int spacing: Tokens.spacing.normal / 2
|
||||
|
||||
// Entries that can shrink to nothing, spacing included
|
||||
function collapsed(entry: var): bool {
|
||||
if (entry.id === "lockStatus")
|
||||
return !Hypr.capsLock && !Hypr.numLock;
|
||||
return false;
|
||||
}
|
||||
|
||||
bottomLeftRadius: Tokens.rounding.smallest / 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.bar.height + Tokens.padding.smallest * 2
|
||||
implicitWidth: row.implicitWidth + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
topLeftRadius: Tokens.rounding.smallest / 2
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
id: model
|
||||
|
||||
values: Config.bar.tray.statusIcons.values.filter(e => e.enabled)
|
||||
}
|
||||
|
||||
DelegateChooser {
|
||||
role: "id"
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "audio"
|
||||
|
||||
delegate: EntryWrapper {
|
||||
name: "audio"
|
||||
|
||||
AudioWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "microphone"
|
||||
|
||||
delegate: EntryWrapper {
|
||||
name: "audio"
|
||||
|
||||
MicWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "bluetooth"
|
||||
|
||||
delegate: EntryWrapper {
|
||||
name: "bluetooth"
|
||||
|
||||
BluetoothWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "network"
|
||||
|
||||
delegate: EntryWrapper {
|
||||
name: "network"
|
||||
|
||||
NetworkWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "power"
|
||||
|
||||
delegate: EntryWrapper {
|
||||
name: "upower"
|
||||
|
||||
UPowerWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component EntryWrapper: Item {
|
||||
required property int index
|
||||
default property Item item
|
||||
property real leftGap: present && index !== root.lastPresent ? margin : 0
|
||||
property int margin: root.spacing / 2
|
||||
required property var modelData
|
||||
property string name: modelData.id.toLowerCase()
|
||||
readonly property bool present: !root.collapsed(modelData)
|
||||
property real rightGap: present && index !== root.firstPresent ? margin : 0
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.leftMargin: Math.round(leftGap)
|
||||
Layout.rightMargin: Math.round(rightGap)
|
||||
children: item
|
||||
implicitHeight: item?.implicitHeight ?? 0
|
||||
implicitWidth: item?.implicitWidth ?? 0
|
||||
|
||||
Behavior on leftGap {
|
||||
Anim {
|
||||
type: Anim.SlowEffects
|
||||
}
|
||||
}
|
||||
Behavior on rightGap {
|
||||
Anim {
|
||||
type: Anim.SlowEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.SystemTray
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules.SysTray.Widgets
|
||||
import qs.Modules
|
||||
import qs.Services
|
||||
|
||||
CustomClippingRect {
|
||||
id: root
|
||||
|
||||
readonly property alias items: repeater
|
||||
readonly property alias layout: sysRow
|
||||
required property RowLayout loader
|
||||
readonly property int padding: Tokens.padding.small
|
||||
required property Wrapper popouts
|
||||
|
||||
bottomRightRadius: Tokens.rounding.smallest / 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.bar.height + Tokens.padding.smallest * 2
|
||||
implicitWidth: sysRow.implicitWidth + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
topRightRadius: Tokens.rounding.smallest / 2
|
||||
|
||||
RowLayout {
|
||||
id: sysRow
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
model: SystemTray.items
|
||||
|
||||
TrayItem {
|
||||
id: trayItem
|
||||
|
||||
required property int index
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
implicitHeight: 34
|
||||
implicitWidth: 34
|
||||
ind: index
|
||||
item: modelData
|
||||
loader: root.loader
|
||||
popouts: root.popouts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@ import Quickshell.Services.SystemTray
|
||||
import qs.Helpers
|
||||
import qs.Modules
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -45,14 +46,14 @@ Item {
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 3
|
||||
color: icon.layer.enabled && enabled && root.current ? DynamicColors.palette.m3primary : "transparent"
|
||||
color: icon.layer.enabled && enabled && root.current ? Colors.palette.m3primary : "transparent"
|
||||
enabled: !Config.bar.tray.showOnHover
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StateLayer {
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
anchors.fill: parent
|
||||
color: icon.layer.enabled && root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: icon.layer.enabled && root.current ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
|
||||
onClicked: mouse => {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
@@ -77,7 +78,7 @@ Item {
|
||||
|
||||
anchors.centerIn: parent
|
||||
antialiasing: true
|
||||
color: root.current && !Config.bar.tray.showOnHover ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: root.current && !Config.bar.tray.showOnHover ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
implicitSize: Config.bar.tray.trayIconSize * root.dpr
|
||||
layer.enabled: Config.bar.tray.recolorIcons
|
||||
scale: 1 / root.dpr
|
||||
|
||||
@@ -4,9 +4,10 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.SystemTray
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Modules.SysTray.Widgets
|
||||
import qs.Modules
|
||||
import qs.Services
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
@@ -44,10 +45,10 @@ RowLayout {
|
||||
function getHoveredSubItem(localX, localY) {
|
||||
let modPos = mapToItem(sysTrayMod, localX, localY);
|
||||
if (sysTrayMod.contains(Qt.point(modPos.x, modPos.y))) {
|
||||
let modRowPos = sysTrayMod.mapToItem(sysModRow, modPos.x, modPos.y);
|
||||
let child = closestRowChild(sysModRow, modRowPos.x);
|
||||
let modRowPos = sysTrayMod.mapToItem(sysIcons, modPos.x, modPos.y);
|
||||
let child = closestRowChild(sysIcons, modRowPos.x);
|
||||
if (child) {
|
||||
if (child.objectName === "audioWidget" && Config.bar.popouts.audio)
|
||||
if (child.objectName === "audio" && Config.bar.popouts.audio)
|
||||
return {
|
||||
id: "audio",
|
||||
item: child
|
||||
@@ -57,7 +58,12 @@ RowLayout {
|
||||
id: "network",
|
||||
item: child
|
||||
};
|
||||
if (child.objectName === "upowerWidget" && Config.bar.popouts.upower)
|
||||
if (child.objectName === "microphone" && Config.bar.popouts.audio)
|
||||
return {
|
||||
id: "audio",
|
||||
item: child
|
||||
};
|
||||
if (child.objectName === "upower" && Config.bar.popouts.upower)
|
||||
return {
|
||||
id: "upower",
|
||||
item: child
|
||||
@@ -85,19 +91,19 @@ RowLayout {
|
||||
return null;
|
||||
}
|
||||
|
||||
height: Config.bar.height + Appearance.padding.smallest * 2
|
||||
spacing: Appearance.padding.small
|
||||
width: sysTray.implicitWidth + sysTrayMod.implicitWidth + Appearance.padding.small
|
||||
height: Config.bar.height + Tokens.padding.smallest * 2
|
||||
spacing: Tokens.padding.small
|
||||
width: sysTray.implicitWidth + sysTrayMod.implicitWidth + Tokens.padding.small
|
||||
|
||||
CustomClippingRect {
|
||||
id: sysTray
|
||||
|
||||
Layout.fillHeight: true
|
||||
bottomRightRadius: Appearance.rounding.smallest / 2
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitWidth: sysRow.width + Appearance.padding.small * 2
|
||||
radius: Appearance.rounding.full
|
||||
topRightRadius: Appearance.rounding.smallest / 2
|
||||
bottomRightRadius: Tokens.rounding.smallest / 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitWidth: sysRow.width + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
topRightRadius: Tokens.rounding.smallest / 2
|
||||
|
||||
Row {
|
||||
id: sysRow
|
||||
@@ -131,43 +137,18 @@ RowLayout {
|
||||
id: sysTrayMod
|
||||
|
||||
Layout.fillHeight: true
|
||||
bottomLeftRadius: Appearance.rounding.smallest / 2
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitWidth: sysModRow.implicitWidth + Appearance.padding.smaller + Appearance.padding.normal
|
||||
radius: Appearance.rounding.full
|
||||
topLeftRadius: Appearance.rounding.smallest / 2
|
||||
bottomLeftRadius: Tokens.rounding.smallest / 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitWidth: sysIcons.implicitWidth + Tokens.padding.smaller + Tokens.padding.normal
|
||||
radius: Tokens.rounding.full
|
||||
topLeftRadius: Tokens.rounding.smallest / 2
|
||||
|
||||
RowLayout {
|
||||
id: sysModRow
|
||||
StatusIcons {
|
||||
id: sysIcons
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
|
||||
AudioWidget {
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: hasContent ? Appearance.spacing.extraSmall / 2 : 0
|
||||
objectName: "audioWidget"
|
||||
|
||||
Behavior on Layout.rightMargin {
|
||||
Anim {
|
||||
type: Anim.FastEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NetworkWidget {
|
||||
objectName: "networkWidget"
|
||||
}
|
||||
|
||||
BluetoothWidget {
|
||||
objectName: "bluetoothWidget"
|
||||
}
|
||||
|
||||
UPowerWidget {
|
||||
Layout.fillHeight: true
|
||||
objectName: "upowerWidget"
|
||||
}
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,75 +4,29 @@ import Quickshell.Io
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Daemons
|
||||
import qs.Modules
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
MaterialIcon {
|
||||
id: speaker
|
||||
|
||||
property color barColor: DynamicColors.palette.m3primary
|
||||
readonly property bool hasContent: mic.visible || speaker.visible
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
animate: true
|
||||
color: Audio.muted ? Colors.palette.m3error : Colors.palette.m3onSurface
|
||||
fill: 1
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
text: Audio.muted ? "volume_off" : "volume_up"
|
||||
|
||||
width: hasContent ? implicitWidth : 0
|
||||
|
||||
MaterialIcon {
|
||||
id: mic
|
||||
|
||||
readonly property bool shouldBeVisible: Config.bar.tray.showMicrophone
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.maximumWidth: shouldBeVisible ? implicitWidth : 0
|
||||
animate: true
|
||||
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.textColor
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
opacity: shouldBeVisible ? 1 : 0
|
||||
scale: shouldBeVisible ? 1 : 0
|
||||
text: Audio.sourceMuted ? "mic_off" : "mic"
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
id: speaker
|
||||
|
||||
readonly property bool shouldBeVisible: Config.bar.tray.showAudio
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.maximumWidth: shouldBeVisible ? implicitWidth : 0
|
||||
animate: true
|
||||
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
opacity: shouldBeVisible ? 1 : 0
|
||||
scale: shouldBeVisible ? 1 : 0
|
||||
text: Audio.muted ? "volume_off" : "volume_up"
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Components
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
animate: true
|
||||
color: DynamicColors.palette.m3onSurface // Network.connected ? root.textColor : DynamicColors.palette.m3error
|
||||
color: Colors.palette.m3onSurface // Network.connected ? root.textColor : Colors.palette.m3error
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
text: "bluetooth"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Daemons
|
||||
import qs.Modules
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
MaterialIcon {
|
||||
id: mic
|
||||
|
||||
animate: true
|
||||
color: (Audio.sourceMuted ?? false) ? Colors.palette.m3error : Colors.palette.m3onSurface
|
||||
fill: 1
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
text: Audio.sourceMuted ? "mic_off" : "mic"
|
||||
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
import qs.Components
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
animate: true
|
||||
color: DynamicColors.palette.m3onSurface // Network.connected ? root.textColor : DynamicColors.palette.m3error
|
||||
color: Colors.palette.m3onSurface // Network.connected ? root.textColor : Colors.palette.m3error
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
text: "android_wifi_4_bar"
|
||||
}
|
||||
|
||||
@@ -2,21 +2,14 @@ import Quickshell.Services.UPower
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool shouldBeActive: Config.bar.tray.showPower
|
||||
|
||||
Layout.preferredHeight: shouldBeActive ? implicitHeight : 0
|
||||
Layout.preferredWidth: shouldBeActive ? implicitWidth : 0
|
||||
implicitHeight: Battery.isLaptop ? batteryIconLoader.item.implicitHeight : upowerIconLoader.item.implicitHeight
|
||||
implicitWidth: Battery.isLaptop ? batteryIconLoader.item.implicitWidth : upowerIconLoader.item.implicitWidth
|
||||
opacity: shouldBeActive ? 1 : 0
|
||||
scale: shouldBeActive ? 1 : 0
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.preferredHeight {
|
||||
Anim {
|
||||
@@ -48,7 +41,7 @@ Item {
|
||||
property real batWidth: 30
|
||||
property real nubHeight: 6
|
||||
property real nubWidth: 2
|
||||
property real radius: Appearance.rounding.smallest / 2
|
||||
property real radius: Tokens.rounding.smallest / 2
|
||||
|
||||
spacing: 1
|
||||
|
||||
@@ -63,7 +56,7 @@ Item {
|
||||
|
||||
CustomText {
|
||||
color: Battery.colors.fg
|
||||
font.pointSize: Appearance.font.size.larger / 1.5
|
||||
font.pointSize: Tokens.font.size.larger / 1.5
|
||||
font.weight: 800
|
||||
height: track.height
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
Reference in New Issue
Block a user