Replace tons of hardcoded stuff

This commit is contained in:
Ly-sec 2025-08-16 01:17:44 +02:00
parent 2a5a3a1b78
commit c673b897cb
27 changed files with 155 additions and 161 deletions

View file

@ -58,7 +58,7 @@ Variants {
id: notificationStack
anchors.top: parent.top
anchors.right: parent.right
spacing: 8 * scaling
spacing: Style.marginSmall * scaling
width: 360 * scaling
visible: true
@ -146,7 +146,7 @@ Variants {
Rectangle {
width: 6 * scaling
height: 6 * scaling
radius: 3 * scaling
radius: Style.radiusTiny * scaling
color: (model.urgency === NotificationUrgency.Critical) ? Colors.mError : (model.urgency === NotificationUrgency.Low) ? Colors.mOnSurface : Colors.mPrimary
Layout.alignment: Qt.AlignVCenter
}

View file

@ -65,10 +65,10 @@ NLoader {
Rectangle {
id: notificationRect
color: Colors.mSurfaceVariant
radius: Style.radiusMedium * scaling
color: Colors.mSurface
radius: Style.radiusLarge * scaling
border.color: Colors.mOutlineVariant
border.width: Math.max(1, Style.borderMedium * scaling)
border.width: Math.max(1, Style.borderThin * scaling)
width: 400 * scaling
height: 500 * scaling
anchors.top: parent.top
@ -165,16 +165,16 @@ NLoader {
RowLayout {
anchors {
fill: parent
margins: 15
margins: Style.marginMedium * scaling
}
spacing: 15
spacing: Style.marginMedium * scaling
// Notification content
Column {
id: notificationContent
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 5
spacing: Style.marginTiniest * scaling
NText {
text: (summary || "No summary").substring(0, 100)
@ -220,7 +220,7 @@ NLoader {
MouseArea {
id: notificationMouseArea
anchors.fill: parent
anchors.rightMargin: 50 * scaling
anchors.rightMargin: Style.marginLarge * 3 * scaling
hoverEnabled: true
// Remove the onClicked handler since we now have a dedicated delete button
}