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:
parent
ddd74c65e4
commit
b723eccc78
56 changed files with 1419 additions and 1423 deletions
|
|
@ -19,21 +19,21 @@ ColumnLayout {
|
|||
|
||||
signal selected(string key)
|
||||
|
||||
spacing: Style.marginSmall * scaling
|
||||
spacing: Style.marginS * scaling
|
||||
Layout.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginTiniest * scaling
|
||||
spacing: Style.marginXXS * scaling
|
||||
Layout.fillWidth: true
|
||||
NText {
|
||||
text: label
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mOnSurface
|
||||
}
|
||||
NText {
|
||||
text: description
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
color: Color.mOnSurface
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
|
@ -63,14 +63,14 @@ ColumnLayout {
|
|||
implicitHeight: preferredHeight
|
||||
color: Color.mSurface
|
||||
border.color: combo.activeFocus ? Color.mTertiary : Color.mOutline
|
||||
border.width: Math.max(1, Style.borderThin * scaling)
|
||||
radius: Style.radiusMedium * scaling
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
radius: Style.radiusM * scaling
|
||||
}
|
||||
|
||||
contentItem: NText {
|
||||
leftPadding: Style.marginLarge * scaling
|
||||
rightPadding: combo.indicator.width + Style.marginLarge * scaling
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
leftPadding: Style.marginL * scaling
|
||||
rightPadding: combo.indicator.width + Style.marginL * scaling
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
text: (combo.currentIndex >= 0 && combo.currentIndex < root.model.count) ? root.model.get(
|
||||
|
|
@ -78,17 +78,17 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
indicator: NIcon {
|
||||
x: combo.width - width - Style.marginMedium * scaling
|
||||
x: combo.width - width - Style.marginM * scaling
|
||||
y: combo.topPadding + (combo.availableHeight - height) / 2
|
||||
text: "arrow_drop_down"
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
}
|
||||
|
||||
popup: Popup {
|
||||
y: combo.height
|
||||
width: combo.width
|
||||
implicitHeight: Math.min(160 * scaling, contentItem.implicitHeight + Style.marginMedium * scaling * 2)
|
||||
padding: Style.marginMedium * scaling
|
||||
implicitHeight: Math.min(160 * scaling, contentItem.implicitHeight + Style.marginM * scaling * 2)
|
||||
padding: Style.marginM * scaling
|
||||
|
||||
contentItem: ListView {
|
||||
property var comboBoxRoot: root
|
||||
|
|
@ -116,16 +116,16 @@ ColumnLayout {
|
|||
|
||||
contentItem: NText {
|
||||
text: name
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: highlighted ? Color.mSurface : Color.mOnSurface
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
width: combo.width - Style.marginMedium * scaling * 3
|
||||
width: combo.width - Style.marginM * scaling * 3
|
||||
color: highlighted ? Color.mTertiary : Color.transparent
|
||||
radius: Style.radiusSmall * scaling
|
||||
radius: Style.radiusS * scaling
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -133,8 +133,8 @@ ColumnLayout {
|
|||
background: Rectangle {
|
||||
color: Color.mSurfaceVariant
|
||||
border.color: Color.mOutline
|
||||
border.width: Math.max(1, Style.borderThin * scaling)
|
||||
radius: Style.radiusMedium * scaling
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
radius: Style.radiusM * scaling
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue