Use Style.spacingXXXl for spacing AND margins (removed Style.marginXXX)
This commit is contained in:
parent
197bd58661
commit
1e0057dcaf
7 changed files with 26 additions and 33 deletions
|
|
@ -15,7 +15,7 @@ PopupWindow {
|
|||
property real anchorY
|
||||
|
||||
implicitWidth: 180 * scaling
|
||||
implicitHeight: Math.max(40 * scaling, listView.contentHeight + (Style.spacingMedium * 2 * scaling))
|
||||
implicitHeight: Math.max(40 * scaling, listView.contentHeight + (Style.marginMedium * 2 * scaling))
|
||||
visible: false
|
||||
color: "transparent"
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ PopupWindow {
|
|||
ListView {
|
||||
id: listView
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.spacingMedium * scaling
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
spacing: 0
|
||||
interactive: false
|
||||
enabled: trayMenu.visible
|
||||
|
|
@ -318,8 +318,8 @@ PopupWindow {
|
|||
ListView {
|
||||
id: listView
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.spacingSmall * scaling
|
||||
spacing: Style.spacingTiny * scaling
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
spacing: Style.marginTiny * scaling
|
||||
interactive: false
|
||||
enabled: subMenu.visible
|
||||
clip: true
|
||||
|
|
@ -354,9 +354,9 @@ PopupWindow {
|
|||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Style.spacingMedium * scaling
|
||||
anchors.rightMargin: Style.spacingMedium * scaling
|
||||
spacing: Style.spacingSmall * scaling
|
||||
anchors.leftMargin: Style.marginMedium * scaling
|
||||
anchors.rightMargin: Style.marginMedium * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
|
||||
NText {
|
||||
id: subText
|
||||
|
|
|
|||
|
|
@ -237,8 +237,8 @@ NLoader {
|
|||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.spacingSmall * scaling
|
||||
spacing: Style.spacingSmall * scaling
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -254,7 +254,7 @@ NLoader {
|
|||
TextInput {
|
||||
id: passwordInputField
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.spacingMedium * scaling
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
text: passwordInput
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
color: Colors.textPrimary
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ NLoader {
|
|||
Column {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
spacing: Style.spacingTiny * 1.5 * scaling // Minimal spacing between tabs
|
||||
spacing: Style.marginTiny * 1.5 * scaling // Minimal spacing between tabs
|
||||
|
||||
Repeater {
|
||||
id: sections
|
||||
|
|
@ -132,7 +132,7 @@ NLoader {
|
|||
NText {
|
||||
text: modelData.label
|
||||
color: selected ? Colors.onAccent : (tabItem.hovering ? Colors.onAccent : Colors.textPrimary)
|
||||
font.pointSize: Style.fontSizeMediumLarge * scaling
|
||||
font.pointSize: Style.fontSizeInter * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ NLoader {
|
|||
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
// Single source of truth for spacing between cards (both axes)
|
||||
property real cardSpacing: Style.spacingLarge * scaling
|
||||
property real cardSpacing: Style.marginLarge * scaling
|
||||
// X coordinate from the bar to align this panel under
|
||||
property real anchorX: root.anchorX
|
||||
// Ensure this panel attaches to the intended screen
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ NBox {
|
|||
model: weatherReady ? Location.data.weather.daily.time : []
|
||||
delegate: ColumnLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: Style.spacingSmall * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
NText {
|
||||
text: Qt.formatDateTime(new Date(Location.data.weather.daily.time[index]), "ddd")
|
||||
color: Colors.textPrimary
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Singleton {
|
|||
property real fontSizeTiny: 7
|
||||
property real fontSizeSmall: 9
|
||||
property real fontSizeMedium: 11
|
||||
property real fontSizeMediumLarge: 12
|
||||
property real fontSizeInter: 12
|
||||
property real fontSizeLarge: 13
|
||||
property real fontSizeXL: 18
|
||||
property real fontSizeXXL: 24
|
||||
|
|
@ -27,23 +27,16 @@ Singleton {
|
|||
property int fontWeightBold: 700
|
||||
|
||||
// Radii
|
||||
property int radiusLarge: 20
|
||||
property int radiusMedium: 16
|
||||
property int radiusSmall: 12
|
||||
property int radiusTiny: 8
|
||||
property int radiusSmall: 12
|
||||
property int radiusMedium: 16
|
||||
property int radiusLarge: 20
|
||||
|
||||
// Border
|
||||
property int borderThin: 1
|
||||
property int borderMedium: 2
|
||||
property int borderThick: 3
|
||||
|
||||
// Spacing
|
||||
property int spacingExtraLarge: 20
|
||||
property int spacingLarge: 16
|
||||
property int spacingMedium: 12
|
||||
property int spacingSmall: 8
|
||||
property int spacingTiny: 4
|
||||
|
||||
// Animation duration (ms)
|
||||
property int animationFast: 150
|
||||
property int animationNormal: 300
|
||||
|
|
@ -59,12 +52,12 @@ Singleton {
|
|||
property int tooltipDelayLong: 1200
|
||||
property int pillDelay: 500
|
||||
|
||||
// Margins and spacing
|
||||
// Margins (for margins and spacing)
|
||||
property int marginTiny: 4
|
||||
property int marginSmall: 8
|
||||
property int marginMedium: 12
|
||||
property int marginLarge: 16
|
||||
property int marginXL: 20
|
||||
property int marginExtraLarge: 20
|
||||
|
||||
// Opacity
|
||||
property real opacityNone: 0.0
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ ComboBox {
|
|||
|
||||
// Label (currently selected)
|
||||
contentItem: NText {
|
||||
leftPadding: Style.spacingLarge * scaling
|
||||
rightPadding: root.indicator.width + Style.spacingLarge * scaling
|
||||
leftPadding: Style.marginLarge * scaling
|
||||
rightPadding: root.indicator.width + Style.marginLarge * scaling
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
@ -49,7 +49,7 @@ ComboBox {
|
|||
|
||||
// Drop down indicator
|
||||
indicator: NText {
|
||||
x: root.width - width - Style.spacingMedium * scaling
|
||||
x: root.width - width - Style.marginMedium * scaling
|
||||
y: root.topPadding + (root.availableHeight - height) / 2
|
||||
text: "arrow_drop_down"
|
||||
font.family: "Material Symbols Outlined"
|
||||
|
|
@ -59,8 +59,8 @@ ComboBox {
|
|||
popup: Popup {
|
||||
y: root.height
|
||||
width: root.width
|
||||
implicitHeight: Math.min(160 * scaling, contentItem.implicitHeight + Style.spacingMedium * scaling * 2)
|
||||
padding: Style.spacingMedium * scaling
|
||||
implicitHeight: Math.min(160 * scaling, contentItem.implicitHeight + Style.marginMedium * scaling * 2)
|
||||
padding: Style.marginMedium * scaling
|
||||
|
||||
contentItem: ListView {
|
||||
clip: true
|
||||
|
|
@ -93,7 +93,7 @@ ComboBox {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
width: root.width - Style.spacingMedium * scaling * 3
|
||||
width: root.width - Style.marginMedium * scaling * 3
|
||||
color: highlighted ? Colors.hover : "transparent"
|
||||
radius: Style.radiusSmall * scaling
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue