Merge branch 'main' into feat/device-pixel-alignment
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 3m19s
C++ / clang-tidy (pull_request) Failing after 3m17s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 32s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Failing after 1m20s
Rust / fmt (pull_request) Successful in 33s
Rust / clippy (pull_request) Successful in 57s
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 3m19s
C++ / clang-tidy (pull_request) Failing after 3m17s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 32s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Failing after 1m20s
Rust / fmt (pull_request) Successful in 33s
Rust / clippy (pull_request) Successful in 57s
This commit is contained in:
@@ -286,7 +286,7 @@ CustomRect {
|
||||
component NotifLine: CustomText {
|
||||
id: notifLine
|
||||
|
||||
required property NotifServer.Notif modelData
|
||||
required property NotificationRow modelData
|
||||
|
||||
Layout.fillWidth: true
|
||||
color: root.urgency === "critical" ? Colors.palette.m3onSecondaryContainer : Colors.palette.m3onSurface
|
||||
|
||||
@@ -5,6 +5,7 @@ import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import ZShell.Config
|
||||
import ZShell.Components
|
||||
import ZShell.Services
|
||||
import qs.Components
|
||||
import qs.Daemons
|
||||
import qs.Helpers
|
||||
@@ -97,7 +98,7 @@ Item {
|
||||
|
||||
property int idx
|
||||
required property int index
|
||||
required property NotifServer.Notif modelData
|
||||
required property NotificationRow modelData
|
||||
readonly property alias nonAnimHeight: notif.nonAnimHeight
|
||||
|
||||
implicitHeight: notif.implicitHeight + (idx === 0 ? 0 : Tokens.spacing.small)
|
||||
|
||||
@@ -5,7 +5,7 @@ import QtQuick.Shapes
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import ZShell.Components
|
||||
import qs.Daemons
|
||||
import ZShell.Services
|
||||
import qs.Helpers
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
@@ -17,7 +17,7 @@ CustomRect {
|
||||
property bool expanded: Config.notifs.openExpanded
|
||||
readonly property bool hasAppIcon: modelData.appIcon.length > 0
|
||||
readonly property bool hasImage: modelData.image.length > 0
|
||||
required property NotifServer.Notif modelData
|
||||
required property NotificationRow modelData
|
||||
readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? Tokens.spacing.extraSmall * 2 + appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2
|
||||
|
||||
color: root.modelData.urgency === NotificationUrgency.Critical ? Colors.palette.m3secondaryContainer : Colors.tPalette.m3surfaceContainer
|
||||
@@ -56,10 +56,10 @@ CustomRect {
|
||||
if (actions.length === 1)
|
||||
actions[0].invoke();
|
||||
}
|
||||
onEntered: root.modelData.timer.stop()
|
||||
onEntered: root.modelData.pausePopup()
|
||||
onExited: {
|
||||
if (!pressed)
|
||||
root.modelData.timer.start();
|
||||
root.modelData.resumePopup();
|
||||
}
|
||||
onPositionChanged: event => {
|
||||
if (pressed) {
|
||||
@@ -69,14 +69,14 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
onPressed: event => {
|
||||
root.modelData.timer.stop();
|
||||
root.modelData.pausePopup();
|
||||
startY = event.y;
|
||||
if (event.button === Qt.MiddleButton)
|
||||
root.modelData.close();
|
||||
}
|
||||
onReleased: event => {
|
||||
if (!containsMouse)
|
||||
root.modelData.timer.start();
|
||||
root.modelData.resumePopup();
|
||||
|
||||
if (Math.abs(root.x) < root.implicitWidth * Config.notifs.clearThreshold)
|
||||
root.x = 0;
|
||||
@@ -200,7 +200,7 @@ CustomRect {
|
||||
radiusX: progressIndicator.width / 2 - Tokens.padding.extraSmall / 2
|
||||
radiusY: progressIndicator.height / 2 - Tokens.padding.extraSmall / 2
|
||||
startAngle: -90
|
||||
sweepAngle: ((root.modelData.hints.value ?? 0) / 100) * 360
|
||||
sweepAngle: (root.modelData.progress / 100) * 360
|
||||
|
||||
Behavior on sweepAngle {
|
||||
Anim {
|
||||
@@ -477,7 +477,12 @@ CustomRect {
|
||||
shapeMorph: true
|
||||
text: modelData.text
|
||||
|
||||
onClicked: modelData.invoke()
|
||||
onClicked: {
|
||||
if (modelData.invokable)
|
||||
modelData.invoke();
|
||||
else if (!root.modelData.resident)
|
||||
root.modelData.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Config
|
||||
import ZShell.Components
|
||||
import ZShell.Services
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
import qs.Daemons
|
||||
@@ -14,7 +16,7 @@ CustomRect {
|
||||
|
||||
readonly property CustomText body: (expandedContent.item as ExpandedBody)?.body ?? null
|
||||
required property bool expanded
|
||||
required property NotifServer.Notif modelData
|
||||
required property NotificationRow modelData
|
||||
readonly property real nonAnimHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + Tokens.padding.medium * 2 : summaryHeightMetrics.height
|
||||
required property ScreenState screenState
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@ import ZShell.Components
|
||||
import qs.Components
|
||||
import qs.Effects
|
||||
import qs.Services
|
||||
import qs.Daemons
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property NotifServer.Notif notif
|
||||
required property NotificationRow notif
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: actionList.implicitHeight
|
||||
@@ -30,7 +29,7 @@ Item {
|
||||
{
|
||||
isClose: true
|
||||
},
|
||||
...(root.notif?.actions ?? []),
|
||||
...Array.from(root.notif?.actions ?? []),
|
||||
{
|
||||
isCopy: true
|
||||
}
|
||||
|
||||
@@ -81,9 +81,8 @@ Item {
|
||||
Behavior on opacity {
|
||||
Anim {}
|
||||
}
|
||||
sourceComponent: SnapLayout {
|
||||
sourceComponent: ColumnLayout {
|
||||
spacing: 20
|
||||
orientation: Qt.Vertical
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
@@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import ZShell.Components
|
||||
import ZShell.Services
|
||||
import ZShell.Config
|
||||
import qs.Daemons
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
@@ -35,7 +35,7 @@ LazyListView {
|
||||
id: notif
|
||||
|
||||
required property int index
|
||||
required property NotifServer.Notif modelData
|
||||
required property NotificationRow modelData
|
||||
property int startY
|
||||
|
||||
LazyListView.preferredHeight: modelData?.closed || LazyListView.removing ? 0 : notifInner.nonAnimHeight
|
||||
|
||||
Reference in New Issue
Block a user