rebase to feat/video-wallpapers

This commit is contained in:
2026-10-29 17:46:27 +01:00
parent ed7e977eb5
commit 858e4e5b12
13 changed files with 116 additions and 123 deletions
+3 -1
View File
@@ -46,7 +46,9 @@ WidgetBase {
} }
required property SnapLayout loader required property SnapLayout loader
required property Wrapper popouts required property Wrapper popouts
readonly property real size: horizontal ? timeText.contentWidth + Tokens.padding.medium * 2 : verticalColumn.implicitHeight + Tokens.padding.medium * 2 readonly property int roundedWidth: Math.round(timeText.implicitWidth)
readonly property int evenWidth: roundedWidth % 2 === 0 ? roundedWidth : roundedWidth + 1
readonly property real size: horizontal ? evenWidth + Tokens.padding.medium * 2 : verticalColumn.implicitHeight + Tokens.padding.medium * 2
required property ScreenState screenState required property ScreenState screenState
implicitHeight: horizontal ? baseSize : size implicitHeight: horizontal ? baseSize : size
@@ -24,7 +24,7 @@ Row {
color: Battery.getColors(root.percentage, root.devState).bg color: Battery.getColors(root.percentage, root.devState).bg
height: root.batHeight height: root.batHeight
radius: root.radius radius: root.radius
width: root.batWidth width: root.batWidth - 1
CustomText { CustomText {
color: Battery.getColors(root.percentage, root.devState).fg color: Battery.getColors(root.percentage, root.devState).fg
-2
View File
@@ -77,8 +77,6 @@ WidgetBase {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: console.log(root.mapToGlobal(0, 0), layout.implicitWidth)
onContainsMouseChanged: { onContainsMouseChanged: {
if (!containsMouse) { if (!containsMouse) {
mediatext.marqueeEnabled = false; mediatext.marqueeEnabled = false;
+1 -2
View File
@@ -24,8 +24,7 @@ WidgetBase {
StateLayer { StateLayer {
color: root.screenState.resources ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface color: root.screenState.resources ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
// onClicked: root.screenState.resources = !root.screenState.resources onClicked: root.screenState.resources = !root.screenState.resources
onClicked: console.log(root.mapToGlobal(0, 0))
} }
GridLayout { GridLayout {
+3 -3
View File
@@ -32,7 +32,7 @@ WidgetBase {
return -1; return -1;
} }
readonly property real size: horizontal ? grid.implicitWidth + grid.anchors.leftMargin + grid.anchors.rightMargin : grid.implicitHeight + grid.anchors.bottomMargin + grid.anchors.topMargin readonly property real size: horizontal ? grid.implicitWidth + grid.anchors.leftMargin + grid.anchors.rightMargin : grid.implicitHeight + grid.anchors.bottomMargin + grid.anchors.topMargin
readonly property int spacing: Tokens.spacing.medium / 2 readonly property int spacing: Tokens.spacing.extraSmall
// Entries that can shrink to nothing, spacing included // Entries that can shrink to nothing, spacing included
function collapsed(entry: var): bool { function collapsed(entry: var): bool {
@@ -134,8 +134,8 @@ WidgetBase {
Layout.rightMargin: root.horizontal ? Math.round(rightGap) : 0 Layout.rightMargin: root.horizontal ? Math.round(rightGap) : 0
Layout.topMargin: root.horizontal ? 0 : Math.round(leftGap) Layout.topMargin: root.horizontal ? 0 : Math.round(leftGap)
children: item children: item
implicitHeight: item?.implicitHeight ?? 0 implicitHeight: item?.height ?? item?.implicitHeight ?? 0
implicitWidth: item?.implicitWidth ?? 0 implicitWidth: item?.width ?? item?.implicitWidth ?? 0
Behavior on leftGap { Behavior on leftGap {
Anim { Anim {
@@ -7,7 +7,7 @@ import qs.Components
import qs.Services import qs.Services
MaterialIcon { MaterialIcon {
id: speaker id: root
required property bool horizontal required property bool horizontal
@@ -16,6 +16,8 @@ MaterialIcon {
fill: 1 fill: 1
fontStyle: Tokens.font.icon.small fontStyle: Tokens.font.icon.small
text: Audio.muted ? "volume_off" : "volume_up" text: Audio.muted ? "volume_off" : "volume_up"
width: Math.round(implicitWidth)
height: Math.round(implicitHeight)
Behavior on Layout.maximumWidth { Behavior on Layout.maximumWidth {
Anim {} Anim {}
@@ -7,7 +7,7 @@ import qs.Components
import qs.Services import qs.Services
MaterialIcon { MaterialIcon {
id: mic id: root
required property bool horizontal required property bool horizontal
@@ -16,6 +16,8 @@ MaterialIcon {
fill: 1 fill: 1
fontStyle: Tokens.font.icon.small fontStyle: Tokens.font.icon.small
text: Audio.sourceMuted ? "mic_off" : "mic" text: Audio.sourceMuted ? "mic_off" : "mic"
width: Math.round(implicitWidth)
height: Math.round(implicitHeight)
Behavior on Layout.maximumWidth { Behavior on Layout.maximumWidth {
Anim {} Anim {}
+3 -17
View File
@@ -53,24 +53,10 @@ Item {
lock: root.lock lock: root.lock
} }
SnapLayout { NotifDock {
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
lock: root.lock
spacing: Tokens.spacing.medium
orientation: Qt.Vertical
CustomRect {
Layout.fillHeight: true
Layout.fillWidth: true
bottomRightRadius: Tokens.rounding.largeIncreased
color: Colors.tPalette.m3surfaceContainer
radius: Tokens.rounding.small
topRightRadius: Tokens.rounding.largeIncreased
NotifDock {
lock: root.lock
}
}
} }
} }
} }
+1 -1
View File
@@ -221,9 +221,9 @@ WlSessionLockSurface {
anchors.fill: parent anchors.fill: parent
color: Colors.palette.m3surface color: Colors.palette.m3surface
layer.enabled: true
opacity: Colors.transparency.enabled ? Colors.transparency.base : 1 opacity: Colors.transparency.enabled ? Colors.transparency.base : 1
radius: lockContent.radius radius: lockContent.radius
layer.enabled: true
layer.effect: MultiEffect { layer.effect: MultiEffect {
blurMax: 15 blurMax: 15
+95 -91
View File
@@ -12,114 +12,118 @@ import qs.Helpers
import qs.Daemons import qs.Daemons
import qs.Services import qs.Services
SnapLayout { CustomRect {
id: root id: root
required property var lock required property var lock
anchors.fill: parent bottomRightRadius: Tokens.rounding.largeIncreased
anchors.margins: Tokens.padding.large color: Colors.tPalette.m3surfaceContainer
radius: Tokens.rounding.small
topRightRadius: Tokens.rounding.largeIncreased
orientation: Qt.Vertical SnapLayout {
spacing: Tokens.spacing.small anchors.fill: parent
anchors.margins: Tokens.padding.large
CustomText { orientation: Qt.Vertical
Layout.fillWidth: true spacing: Tokens.spacing.small
color: Colors.palette.m3outline
elide: Text.ElideRight
font: Tokens.font.mono.builders.small.weight(Font.Medium).build()
text: NotifServer.list.length > 0 ? qsTr("%1 notification%2").arg(NotifServer.list.length).arg(NotifServer.list.length === 1 ? "" : "s") : qsTr("Notifications")
}
Item { CustomText {
id: clipRect Layout.fillWidth: true
color: Colors.palette.m3outline
Layout.fillHeight: true elide: Text.ElideRight
Layout.fillWidth: true font: Tokens.font.mono.builders.small.weight(Font.Medium).build()
text: NotifServer.list.length > 0 ? qsTr("%1 notification%2").arg(NotifServer.list.length).arg(NotifServer.list.length === 1 ? "" : "s") : qsTr("Notifications")
Loader {
active: opacity > 0
anchors.centerIn: parent
opacity: NotifServer.list.length > 0 ? 0 : 1
Behavior on opacity {
Anim {
duration: Tokens.anim.durations.extraLarge
}
}
sourceComponent: SnapLayout {
spacing: Tokens.spacing.largeIncreased
orientation: Qt.Vertical
CustomText {
Layout.alignment: Qt.AlignHCenter
color: Colors.palette.m3outlineVariant
font: Tokens.font.headline.builders.small.width(90).build()
text: qsTr("No Notifications")
}
}
} }
CustomListView { Item {
anchors.fill: parent Layout.fillHeight: true
clip: true Layout.fillWidth: true
spacing: Tokens.spacing.small
add: Transition { Loader {
Anim { active: opacity > 0
from: 0 anchors.centerIn: parent
property: "opacity" opacity: NotifServer.list.length > 0 ? 0 : 1
to: 1
Behavior on opacity {
Anim {
duration: Tokens.anim.durations.extraLarge
}
} }
sourceComponent: ColumnLayout {
spacing: Tokens.spacing.largeIncreased
Anim { CustomText {
duration: Tokens.anim.durations.expressiveDefaultSpatial Layout.alignment: Qt.AlignHCenter
easing: Tokens.anim.expressiveDefaultSpatial color: Colors.palette.m3outlineVariant
from: 0 font: Tokens.font.headline.builders.small.width(90).build()
property: "scale" text: qsTr("No Notifications")
to: 1 }
} }
} }
delegate: NotifGroup {}
displaced: Transition {
Anim {
properties: "opacity,scale"
to: 1
}
Anim { CustomListView {
duration: Tokens.anim.durations.expressiveDefaultSpatial anchors.fill: parent
easing: Tokens.anim.expressiveDefaultSpatial clip: true
property: "y" spacing: Tokens.spacing.small
}
}
model: ScriptModel {
values: {
const list = NotifServer.notClosed.map(n => [n.appName, null]);
return [...new Map(list).keys()];
}
}
move: Transition {
Anim {
properties: "opacity,scale"
to: 1
}
Anim { add: Transition {
duration: Tokens.anim.durations.expressiveDefaultSpatial Anim {
easing: Tokens.anim.expressiveDefaultSpatial from: 0
property: "y" property: "opacity"
} to: 1
} }
remove: Transition {
Anim {
property: "opacity"
to: 0
}
Anim { Anim {
property: "scale" duration: Tokens.anim.durations.expressiveDefaultSpatial
to: 0.6 easing: Tokens.anim.expressiveDefaultSpatial
from: 0
property: "scale"
to: 1
}
}
delegate: NotifGroup {}
displaced: Transition {
Anim {
properties: "opacity,scale"
to: 1
}
Anim {
duration: Tokens.anim.durations.expressiveDefaultSpatial
easing: Tokens.anim.expressiveDefaultSpatial
property: "y"
}
}
model: ScriptModel {
values: {
const list = NotifServer.notClosed.map(n => [n.appName, null]);
return [...new Map(list).keys()];
}
}
move: Transition {
Anim {
properties: "opacity,scale"
to: 1
}
Anim {
duration: Tokens.anim.durations.expressiveDefaultSpatial
easing: Tokens.anim.expressiveDefaultSpatial
property: "y"
}
}
remove: Transition {
Anim {
property: "opacity"
to: 0
}
Anim {
property: "scale"
to: 0.6
}
} }
} }
} }
+2 -2
View File
@@ -19,6 +19,7 @@ CustomRect {
return base + brief.anchors.topMargin; return base + brief.anchors.topMargin;
} }
radius: Tokens.rounding.small radius: Tokens.rounding.small
topLeftRadius: Tokens.rounding.largeIncreased
Timer { Timer {
interval: 900000 // 15 minutes interval: 900000 // 15 minutes
@@ -48,7 +49,6 @@ CustomRect {
anchors.right: parent.right anchors.right: parent.right
asynchronous: true asynchronous: true
sourceComponent: Forecast { sourceComponent: Forecast {}
}
} }
} }
@@ -59,7 +59,6 @@ Item {
id: container id: container
anchors.fill: parent anchors.fill: parent
layer.enabled: opacity < 1
objectName: "ConversationContainer" objectName: "ConversationContainer"
Component.onCompleted: { Component.onCompleted: {
+1
View File
@@ -14,6 +14,7 @@ qt_logging_rules = (
"qt.qpa.wayland.*=false;" "qt.qpa.wayland.*=false;"
"scene=false;" "scene=false;"
"quickshell.service.sni.watcher=false;" "quickshell.service.sni.watcher=false;"
"quickshell.dbus.*=false;"
"default.warning=false;" "default.warning=false;"
"default.info=false;" "default.info=false;"
"qt.sql.qsqldatabase" "qt.sql.qsqldatabase"