Renamed most font and sizing shorthands properties for easier understanding and maintenance

property real fontSizeXS: 9
  property real fontSizeS: 10
  property real fontSizeM: 11
  property real fontSizeL: 13
  property real fontSizeXL: 16
  property real fontSizeXXL: 18
  property real fontSizeXXXL: 24
This commit is contained in:
quadbyte 2025-08-18 11:12:51 -04:00
parent ddd74c65e4
commit b723eccc78
56 changed files with 1419 additions and 1423 deletions

View file

@ -34,8 +34,8 @@ Variants {
anchors.top: true
anchors.right: true
margins.top: (Style.barHeight + Style.marginMedium) * scaling
margins.right: Style.marginMedium * scaling
margins.top: (Style.barHeight + Style.marginM) * scaling
margins.right: Style.marginM * scaling
implicitWidth: 360 * scaling
implicitHeight: Math.min(notificationStack.implicitHeight, (NotificationService.maxVisible * 120) * scaling)
WlrLayershell.layer: WlrLayer.Overlay
@ -59,7 +59,7 @@ Variants {
id: notificationStack
anchors.top: parent.top
anchors.right: parent.right
spacing: Style.marginSmall * scaling
spacing: Style.marginS * scaling
width: 360 * scaling
visible: true
@ -68,11 +68,11 @@ Variants {
model: notificationModel
delegate: Rectangle {
width: 360 * scaling
height: Math.max(80 * scaling, contentColumn.implicitHeight + (Style.marginMedium * 2 * scaling))
height: Math.max(80 * scaling, contentColumn.implicitHeight + (Style.marginM * 2 * scaling))
clip: true
radius: Style.radiusMedium * scaling
radius: Style.radiusM * scaling
border.color: Color.mPrimary
border.width: Math.max(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderS * scaling)
color: Color.mSurface
// Animation properties
@ -134,20 +134,20 @@ Variants {
Column {
id: contentColumn
anchors.fill: parent
anchors.margins: Style.marginMedium * scaling
spacing: Style.marginSmall * scaling
anchors.margins: Style.marginM * scaling
spacing: Style.marginS * scaling
RowLayout {
spacing: Style.marginSmall * scaling
spacing: Style.marginS * scaling
NText {
text: (model.appName || model.desktopEntry) || "Unknown App"
color: Color.mSecondary
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
}
Rectangle {
width: 6 * scaling
height: 6 * scaling
radius: Style.radiusTiny * scaling
radius: Style.radiusXS * scaling
color: (model.urgency === NotificationUrgency.Critical) ? Color.mError : (model.urgency === NotificationUrgency.Low) ? Color.mOnSurface : Color.mPrimary
Layout.alignment: Qt.AlignVCenter
}
@ -157,13 +157,13 @@ Variants {
NText {
text: NotificationService.formatTimestamp(model.timestamp)
color: Color.mOnSurface
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
}
}
NText {
text: model.summary || "No summary"
font.pointSize: Style.fontSizeLarge * scaling
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
wrapMode: Text.Wrap
@ -174,7 +174,7 @@ Variants {
NText {
text: model.body || ""
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurface
wrapMode: Text.Wrap
width: 300 * scaling
@ -190,7 +190,7 @@ Variants {
showBorder: false
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: Style.marginSmall * scaling
anchors.margins: Style.marginS * scaling
onClicked: {
animateOut()