config moved to c++ plugin, removed old qml + fileview implementation

This commit is contained in:
2026-08-13 02:25:26 +02:00
parent c29b91cd26
commit 3cd3209b28
341 changed files with 4851 additions and 3502 deletions
+17 -20
View File
@@ -1,7 +1,7 @@
pragma ComponentBehavior: Bound
import qs.Components
import qs.Config
import ZShell.Config
import qs.Modules
import qs.Daemons
import qs.Helpers
@@ -9,6 +9,7 @@ import Quickshell
import Quickshell.Services.Notifications
import QtQuick
import QtQuick.Layouts
import qs.Services
CustomRect {
id: root
@@ -41,9 +42,9 @@ CustomRect {
anchors.left: parent?.left
anchors.right: parent?.right
clip: true
color: DynamicColors.layer(DynamicColors.palette.m3surfaceContainer, 2)
color: Colors.layer(Colors.palette.m3surfaceContainer, 2)
implicitHeight: content.implicitHeight + 10 * 2
radius: Appearance.rounding.smallest
radius: Tokens.rounding.smallest
Component.onDestruction: {
if (notifCount === 0 && expanded)
@@ -91,7 +92,7 @@ CustomRect {
id: materialIconComp
MaterialIcon {
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onError : root.urgency === NotificationUrgency.Low ? DynamicColors.palette.m3onSurface : DynamicColors.palette.m3onSecondaryContainer
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colors.palette.m3onSurface : Colors.palette.m3onSecondaryContainer
font.pointSize: 18
text: Icons.getNotifIcon(root.notifs[0]?.summary, root.urgency)
}
@@ -99,8 +100,8 @@ CustomRect {
CustomClippingRect {
anchors.fill: parent
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3error : root.urgency === NotificationUrgency.Low ? DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 3) : DynamicColors.palette.m3secondaryContainer
radius: Appearance.rounding.full
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3error : root.urgency === NotificationUrgency.Low ? Colors.layer(Colors.palette.m3surfaceContainerHigh, 3) : Colors.palette.m3secondaryContainer
radius: Tokens.rounding.full
Loader {
anchors.centerIn: parent
@@ -114,10 +115,10 @@ CustomRect {
anchors.right: parent.right
sourceComponent: CustomRect {
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3error : root.urgency === NotificationUrgency.Low ? DynamicColors.palette.m3surfaceContainerHigh : DynamicColors.palette.m3secondaryContainer
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3error : root.urgency === NotificationUrgency.Low ? Colors.palette.m3surfaceContainerHigh : Colors.palette.m3secondaryContainer
implicitHeight: Config.notifs.sizes.badge
implicitWidth: Config.notifs.sizes.badge
radius: Appearance.rounding.full
radius: Tokens.rounding.full
CustomIcon {
anchors.centerIn: parent
@@ -151,7 +152,7 @@ CustomRect {
CustomText {
Layout.fillWidth: true
color: DynamicColors.palette.m3onSurfaceVariant
color: Colors.palette.m3onSurfaceVariant
elide: Text.ElideRight
font.pointSize: 11
text: root.modelData
@@ -159,19 +160,19 @@ CustomRect {
CustomText {
animate: true
color: DynamicColors.palette.m3outline
color: Colors.palette.m3outline
font.pointSize: 11
text: root.notifs.find(n => !n.closed)?.timeStr ?? ""
}
CustomRect {
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3error : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 3)
implicitHeight: groupCount.implicitHeight + Appearance.padding.small
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3error : Colors.layer(Colors.palette.m3surfaceContainerHigh, 3)
implicitHeight: groupCount.implicitHeight + Tokens.padding.small
implicitWidth: expandBtn.implicitWidth + 7 * 2
radius: Appearance.rounding.full
radius: Tokens.rounding.full
StateLayer {
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onSurface
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
onClicked: {
root.toggleExpand(!root.expanded);
@@ -189,7 +190,7 @@ CustomRect {
Layout.leftMargin: 10 / 2
animate: true
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onSurface
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
font.pointSize: 11
text: root.notifCount
}
@@ -197,20 +198,16 @@ CustomRect {
MaterialIcon {
Layout.rightMargin: -10 / 2
// Layout.topMargin: root.expanded ? -Math.floor(7 / 2) : 0
color: root.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onSurface
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
rotation: root.expanded ? 180 : 0
text: "expand_more"
Behavior on Layout.topMargin {
Anim {
duration: MaterialEasing.expressiveEffectsTime
easing.bezierCurve: MaterialEasing.expressiveEffects
}
}
Behavior on rotation {
Anim {
duration: MaterialEasing.expressiveEffectsTime
easing.bezierCurve: MaterialEasing.expressiveEffects
}
}
}