Replace some hardcoded spacing by their respective shorthands

This commit is contained in:
quadbyte 2025-08-13 17:22:42 -04:00
parent ade52f5013
commit a1b6c0845d
4 changed files with 13 additions and 13 deletions

View file

@ -32,8 +32,8 @@ Item {
IconImage { IconImage {
id: trayIcon id: trayIcon
anchors.centerIn: parent anchors.centerIn: parent
width: 16 * scaling width: Style.marginLarge * scaling
height: 16 * scaling height: Style.marginLarge * scaling
smooth: false smooth: false
asynchronous: true asynchronous: true
backer.fillMode: Image.PreserveAspectFit backer.fillMode: Image.PreserveAspectFit

View file

@ -134,8 +134,8 @@ PopupWindow {
} }
Image { Image {
Layout.preferredWidth: 16 * scaling Layout.preferredWidth: Style.marginLarge * scaling
Layout.preferredHeight: 16 * scaling Layout.preferredHeight: Style.marginLarge * scaling
source: modelData?.icon ?? "" source: modelData?.icon ?? ""
visible: (modelData?.icon ?? "") !== "" visible: (modelData?.icon ?? "") !== ""
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
@ -369,8 +369,8 @@ PopupWindow {
} }
Image { Image {
Layout.preferredWidth: 16 * scaling Layout.preferredWidth: Style.marginLarge * scaling
Layout.preferredHeight: 16 * scaling Layout.preferredHeight: Style.marginLarge * scaling
source: modelData?.icon ?? "" source: modelData?.icon ?? ""
visible: (modelData?.icon ?? "") !== "" visible: (modelData?.icon ?? "") !== ""
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit

View file

@ -127,7 +127,7 @@ NLoader {
// NSlider // NSlider
ColumnLayout { ColumnLayout {
spacing: 16 * scaling spacing: Style.marginLarge * scaling
NText { NText {
text: "Scaling" text: "Scaling"
color: Colors.accentSecondary color: Colors.accentSecondary
@ -170,7 +170,7 @@ NLoader {
// NIconButton // NIconButton
ColumnLayout { ColumnLayout {
spacing: 16 * scaling spacing: Style.marginLarge * scaling
NText { NText {
text: "NIconButton" text: "NIconButton"
color: Colors.accentSecondary color: Colors.accentSecondary

View file

@ -69,7 +69,7 @@ ColumnLayout {
font.pointSize: 14 * Scaling.scale(screen) font.pointSize: 14 * Scaling.scale(screen)
color: Colors.textSecondary color: Colors.textSecondary
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
Layout.bottomMargin: 16 * Scaling.scale(screen) Layout.bottomMargin: Style.marginLarge * scaling.scale(screen)
} }
GridLayout { GridLayout {
@ -80,28 +80,28 @@ ColumnLayout {
NText { NText {
text: "Latest Version:" text: "Latest Version:"
font.pointSize: 16 * Scaling.scale(screen) font.pointSize: Style.marginLarge * scaling.scale(screen)
color: Colors.textSecondary color: Colors.textSecondary
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
NText { NText {
text: root.latestVersion text: root.latestVersion
font.pointSize: 16 * Scaling.scale(screen) font.pointSize: Style.marginLarge * scaling.scale(screen)
color: Colors.textPrimary color: Colors.textPrimary
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
} }
NText { NText {
text: "Installed Version:" text: "Installed Version:"
font.pointSize: 16 * Scaling.scale(screen) font.pointSize: Style.marginLarge * scaling.scale(screen)
color: Colors.textSecondary color: Colors.textSecondary
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
NText { NText {
text: root.currentVersion text: root.currentVersion
font.pointSize: 16 * Scaling.scale(screen) font.pointSize: Style.marginLarge * scaling.scale(screen)
color: Colors.textPrimary color: Colors.textPrimary
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
} }