diff --git a/Modules/Bar/Components/Clock.qml b/Modules/Bar/Components/Clock.qml index e47f198..9d3c4a8 100644 --- a/Modules/Bar/Components/Clock.qml +++ b/Modules/Bar/Components/Clock.qml @@ -45,7 +45,9 @@ WidgetBase { } required property GridLayout loader 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 implicitHeight: horizontal ? baseSize : size diff --git a/Modules/Bar/Components/Common/BatteryIcon.qml b/Modules/Bar/Components/Common/BatteryIcon.qml index 6a78dfa..01606b2 100644 --- a/Modules/Bar/Components/Common/BatteryIcon.qml +++ b/Modules/Bar/Components/Common/BatteryIcon.qml @@ -24,7 +24,7 @@ Row { color: Battery.getColors(root.percentage, root.devState).bg height: root.batHeight radius: root.radius - width: root.batWidth + width: root.batWidth - 1 CustomText { color: Battery.getColors(root.percentage, root.devState).fg diff --git a/Modules/Bar/Components/MediaWidget.qml b/Modules/Bar/Components/MediaWidget.qml index 4676109..542dc0a 100644 --- a/Modules/Bar/Components/MediaWidget.qml +++ b/Modules/Bar/Components/MediaWidget.qml @@ -76,8 +76,6 @@ WidgetBase { anchors.fill: parent hoverEnabled: true - onClicked: console.log(root.mapToGlobal(0, 0), layout.implicitWidth) - onContainsMouseChanged: { if (!containsMouse) { mediatext.marqueeEnabled = false; diff --git a/Modules/Bar/Components/Resources.qml b/Modules/Bar/Components/Resources.qml index 8de95ae..c22435d 100644 --- a/Modules/Bar/Components/Resources.qml +++ b/Modules/Bar/Components/Resources.qml @@ -23,8 +23,7 @@ WidgetBase { StateLayer { color: root.screenState.resources ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface - // onClicked: root.screenState.resources = !root.screenState.resources - onClicked: console.log(root.mapToGlobal(0, 0)) + onClicked: root.screenState.resources = !root.screenState.resources } GridLayout { diff --git a/Modules/Bar/Components/StatusIcons.qml b/Modules/Bar/Components/StatusIcons.qml index b0c58af..43e1d30 100644 --- a/Modules/Bar/Components/StatusIcons.qml +++ b/Modules/Bar/Components/StatusIcons.qml @@ -31,7 +31,7 @@ WidgetBase { 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 int spacing: Tokens.spacing.medium / 2 + readonly property int spacing: Tokens.spacing.extraSmall // Entries that can shrink to nothing, spacing included function collapsed(entry: var): bool { @@ -51,14 +51,12 @@ WidgetBase { Behavior on implicitHeight { enabled: !root.horizontal - Anim { - } + Anim {} } Behavior on implicitWidth { enabled: root.horizontal - Anim { - } + Anim {} } GridLayout { @@ -70,6 +68,8 @@ WidgetBase { anchors.rightMargin: root.horizontal ? Tokens.padding.extraSmall : 0 anchors.topMargin: root.horizontal ? 0 : Tokens.padding.extraSmall columns: root.horizontal ? -1 : 1 + columnSpacing: root.spacing + rowSpacing: root.spacing Repeater { model: ScriptModel { @@ -111,8 +111,7 @@ WidgetBase { delegate: EntryWrapper { name: "upower" - UPowerWidget { - } + UPowerWidget {} } } } @@ -135,8 +134,8 @@ WidgetBase { Layout.rightMargin: root.horizontal ? Math.round(rightGap) : 0 Layout.topMargin: root.horizontal ? 0 : Math.round(leftGap) children: item - implicitHeight: item?.implicitHeight ?? 0 - implicitWidth: item?.implicitWidth ?? 0 + implicitHeight: item?.height ?? item?.implicitHeight ?? 0 + implicitWidth: item?.width ?? item?.implicitWidth ?? 0 Behavior on leftGap { Anim { diff --git a/Modules/Bar/Components/StatusIcons/AudioWidget.qml b/Modules/Bar/Components/StatusIcons/AudioWidget.qml index a6fab2a..d4fd37c 100644 --- a/Modules/Bar/Components/StatusIcons/AudioWidget.qml +++ b/Modules/Bar/Components/StatusIcons/AudioWidget.qml @@ -6,7 +6,7 @@ import qs.Components import qs.Services MaterialIcon { - id: speaker + id: root required property bool horizontal @@ -15,6 +15,8 @@ MaterialIcon { fill: 1 fontStyle: Tokens.font.icon.small text: Audio.muted ? "volume_off" : "volume_up" + width: Math.round(implicitWidth) + height: Math.round(implicitHeight) Behavior on Layout.maximumWidth { Anim {} diff --git a/Modules/Bar/Components/StatusIcons/MicWidget.qml b/Modules/Bar/Components/StatusIcons/MicWidget.qml index cb61bee..e31d696 100644 --- a/Modules/Bar/Components/StatusIcons/MicWidget.qml +++ b/Modules/Bar/Components/StatusIcons/MicWidget.qml @@ -6,7 +6,7 @@ import qs.Components import qs.Services MaterialIcon { - id: mic + id: root required property bool horizontal @@ -15,6 +15,8 @@ MaterialIcon { fill: 1 fontStyle: Tokens.font.icon.small text: Audio.sourceMuted ? "mic_off" : "mic" + width: Math.round(implicitWidth) + height: Math.round(implicitHeight) Behavior on Layout.maximumWidth { Anim {} diff --git a/Modules/Bar/Components/TrayIcons.qml b/Modules/Bar/Components/TrayIcons.qml index fae91a7..242234f 100644 --- a/Modules/Bar/Components/TrayIcons.qml +++ b/Modules/Bar/Components/TrayIcons.qml @@ -38,6 +38,7 @@ WidgetBase { anchors.topMargin: root.horizontal ? 0 : Tokens.padding.extraSmall columns: root.horizontal ? -1 : 1 rowSpacing: -2 + columnSpacing: Tokens.spacing.extraSmall Repeater { id: repeater diff --git a/Modules/Lock/Content.qml b/Modules/Lock/Content.qml index cbe2028..0fd7c3b 100644 --- a/Modules/Lock/Content.qml +++ b/Modules/Lock/Content.qml @@ -49,22 +49,10 @@ Item { lock: root.lock } - ColumnLayout { + NotifDock { + Layout.fillHeight: true Layout.fillWidth: true - spacing: Tokens.spacing.medium - - 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 - } - } + lock: root.lock } } } diff --git a/Modules/Lock/LockSurface.qml b/Modules/Lock/LockSurface.qml index 540e704..22369bc 100644 --- a/Modules/Lock/LockSurface.qml +++ b/Modules/Lock/LockSurface.qml @@ -221,9 +221,9 @@ WlSessionLockSurface { anchors.fill: parent color: Colors.palette.m3surface - layer.enabled: true opacity: Colors.transparency.enabled ? Colors.transparency.base : 1 radius: lockContent.radius + layer.enabled: true layer.effect: MultiEffect { blurMax: 15 diff --git a/Modules/Lock/NotifDock.qml b/Modules/Lock/NotifDock.qml index 893e04e..427ae8b 100644 --- a/Modules/Lock/NotifDock.qml +++ b/Modules/Lock/NotifDock.qml @@ -11,111 +11,116 @@ import ZShell.Config import qs.Daemons import qs.Services -ColumnLayout { +CustomRect { id: root required property var lock - anchors.fill: parent - anchors.margins: Tokens.padding.large - spacing: Tokens.spacing.small + bottomRightRadius: Tokens.rounding.largeIncreased + color: Colors.tPalette.m3surfaceContainer + radius: Tokens.rounding.small + topRightRadius: Tokens.rounding.largeIncreased - CustomText { - Layout.fillWidth: true - 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") - } + ColumnLayout { + anchors.fill: parent + anchors.margins: Tokens.padding.large + spacing: Tokens.spacing.small - Item { - id: clipRect - - Layout.fillHeight: true - Layout.fillWidth: true - - Loader { - active: opacity > 0 - anchors.centerIn: parent - opacity: NotifServer.list.length > 0 ? 0 : 1 - - Behavior on opacity { - Anim { - duration: Tokens.anim.durations.extraLarge - } - } - sourceComponent: ColumnLayout { - spacing: Tokens.spacing.largeIncreased - - CustomText { - Layout.alignment: Qt.AlignHCenter - color: Colors.palette.m3outlineVariant - font: Tokens.font.headline.builders.small.width(90).build() - text: qsTr("No Notifications") - } - } + CustomText { + Layout.fillWidth: true + 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") } - CustomListView { - anchors.fill: parent - clip: true - spacing: Tokens.spacing.small + Item { + Layout.fillHeight: true + Layout.fillWidth: true - add: Transition { - Anim { - from: 0 - property: "opacity" - to: 1 + Loader { + active: opacity > 0 + anchors.centerIn: parent + opacity: NotifServer.list.length > 0 ? 0 : 1 + + Behavior on opacity { + Anim { + duration: Tokens.anim.durations.extraLarge + } } + sourceComponent: ColumnLayout { + spacing: Tokens.spacing.largeIncreased - Anim { - duration: Tokens.anim.durations.expressiveDefaultSpatial - easing: Tokens.anim.expressiveDefaultSpatial - from: 0 - property: "scale" - to: 1 + CustomText { + Layout.alignment: Qt.AlignHCenter + color: Colors.palette.m3outlineVariant + font: Tokens.font.headline.builders.small.width(90).build() + text: qsTr("No Notifications") + } } } - 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 - } + CustomListView { + anchors.fill: parent + clip: true + spacing: Tokens.spacing.small - Anim { - duration: Tokens.anim.durations.expressiveDefaultSpatial - easing: Tokens.anim.expressiveDefaultSpatial - property: "y" - } - } - remove: Transition { - Anim { - property: "opacity" - to: 0 - } + add: Transition { + Anim { + from: 0 + property: "opacity" + to: 1 + } - Anim { - property: "scale" - to: 0.6 + Anim { + duration: Tokens.anim.durations.expressiveDefaultSpatial + 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 + } } } } diff --git a/Modules/Lock/WeatherInfo.qml b/Modules/Lock/WeatherInfo.qml index 3de1b1f..feaec45 100644 --- a/Modules/Lock/WeatherInfo.qml +++ b/Modules/Lock/WeatherInfo.qml @@ -19,6 +19,7 @@ CustomRect { return base + brief.anchors.topMargin; } radius: Tokens.rounding.small + topLeftRadius: Tokens.rounding.largeIncreased Timer { interval: 900000 // 15 minutes @@ -48,7 +49,6 @@ CustomRect { anchors.right: parent.right asynchronous: true - sourceComponent: Forecast { - } + sourceComponent: Forecast {} } } diff --git a/Modules/Sidebar/Chat/Content/ChatHost.qml b/Modules/Sidebar/Chat/Content/ChatHost.qml index d97d7d4..8e3eb3f 100644 --- a/Modules/Sidebar/Chat/Content/ChatHost.qml +++ b/Modules/Sidebar/Chat/Content/ChatHost.qml @@ -59,7 +59,6 @@ Item { id: container anchors.fill: parent - layer.enabled: opacity < 1 objectName: "ConversationContainer" Component.onCompleted: { diff --git a/cli/src/zshell/subcommands/shell.py b/cli/src/zshell/subcommands/shell.py index f55311a..70ca638 100644 --- a/cli/src/zshell/subcommands/shell.py +++ b/cli/src/zshell/subcommands/shell.py @@ -14,6 +14,7 @@ qt_logging_rules = ( "qt.qpa.wayland.*=false;" "scene=false;" "quickshell.service.sni.watcher=false;" + "quickshell.dbus.*=false;" "default.warning=false;" "default.info=false;" "qt.sql.qsqldatabase"