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
|
|
@ -83,15 +83,15 @@ NLoader {
|
|||
Rectangle {
|
||||
id: wifiMenuRect
|
||||
color: Color.mSurface
|
||||
radius: Style.radiusLarge * scaling
|
||||
radius: Style.radiusL * scaling
|
||||
border.color: Color.mOutlineVariant
|
||||
border.width: Math.max(1, Style.borderThin * scaling)
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
width: 340 * scaling
|
||||
height: 500 * scaling
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: Style.marginTiny * scaling
|
||||
anchors.rightMargin: Style.marginTiny * scaling
|
||||
anchors.topMargin: Style.marginXS * scaling
|
||||
anchors.rightMargin: Style.marginXS * scaling
|
||||
|
||||
// Animation properties
|
||||
property real scaleValue: 0.8
|
||||
|
|
@ -123,22 +123,22 @@ NLoader {
|
|||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginLarge * scaling
|
||||
spacing: Style.marginMedium * scaling
|
||||
anchors.margins: Style.marginL * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginMedium * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
NIcon {
|
||||
text: "wifi"
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
color: Color.mPrimary
|
||||
}
|
||||
|
||||
NText {
|
||||
text: "WiFi"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
font.bold: true
|
||||
color: Color.mOnSurface
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -174,7 +174,7 @@ NLoader {
|
|||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
visible: Settings.data.network.wifiEnabled && NetworkService.isLoading
|
||||
spacing: Style.marginMedium * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
NBusyIndicator {
|
||||
running: NetworkService.isLoading
|
||||
|
|
@ -195,18 +195,18 @@ NLoader {
|
|||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
visible: !Settings.data.network.wifiEnabled
|
||||
spacing: Style.marginMedium * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
NIcon {
|
||||
text: "wifi_off"
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
font.pointSize: Style.fontSizeXXXL * scaling
|
||||
color: Color.mOnSurfaceVariant
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
NText {
|
||||
text: "WiFi is disabled"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
color: Color.mOnSurfaceVariant
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ NLoader {
|
|||
anchors.fill: parent
|
||||
visible: Settings.data.network.wifiEnabled && !NetworkService.isLoading
|
||||
model: Object.values(NetworkService.networks)
|
||||
spacing: Style.marginMedium * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
clip: true
|
||||
|
||||
delegate: Item {
|
||||
|
|
@ -240,23 +240,23 @@ NLoader {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.baseWidgetSize * 1.5 * scaling
|
||||
radius: Style.radiusMedium * scaling
|
||||
radius: Style.radiusM * scaling
|
||||
color: modelData.connected ? Color.mPrimary : (networkMouseArea.containsMouse ? Color.mTertiary : Color.transparent)
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
anchors.margins: Style.marginS * scaling
|
||||
spacing: Style.marginS * scaling
|
||||
|
||||
NIcon {
|
||||
text: NetworkService.signalIcon(modelData.signal)
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginTiny * scaling
|
||||
spacing: Style.marginXS * scaling
|
||||
|
||||
// SSID
|
||||
NText {
|
||||
|
|
@ -270,7 +270,7 @@ NLoader {
|
|||
// Security Protocol
|
||||
NText {
|
||||
text: modelData.security && modelData.security !== "--" ? modelData.security : "Open"
|
||||
font.pointSize: Style.fontSizeTiny * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
|
||||
|
|
@ -281,7 +281,7 @@ NLoader {
|
|||
&& NetworkService.connectStatus === "error" && NetworkService.connectError.length > 0
|
||||
text: NetworkService.connectError
|
||||
color: Color.mError
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
|
@ -306,7 +306,7 @@ NLoader {
|
|||
NText {
|
||||
visible: modelData.connected
|
||||
text: "connected"
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
|
||||
}
|
||||
}
|
||||
|
|
@ -337,15 +337,15 @@ NLoader {
|
|||
id: passwordPromptSection
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: modelData.ssid === passwordPromptSsid && showPasswordPrompt ? 60 : 0
|
||||
Layout.margins: Style.marginSmall * scaling
|
||||
Layout.margins: Style.marginS * scaling
|
||||
visible: modelData.ssid === passwordPromptSsid && showPasswordPrompt
|
||||
color: Color.mSurfaceVariant
|
||||
radius: Style.radiusSmall * scaling
|
||||
radius: Style.radiusS * scaling
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
anchors.margins: Style.marginS * scaling
|
||||
spacing: Style.marginS * scaling
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -353,17 +353,17 @@ NLoader {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Style.radiusTiny * scaling
|
||||
radius: Style.radiusXS * scaling
|
||||
color: Color.transparent
|
||||
border.color: passwordInputField.activeFocus ? Color.mPrimary : Color.mOutline
|
||||
border.width: Math.max(1, Style.borderThin * scaling)
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
|
||||
TextInput {
|
||||
id: passwordInputField
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
anchors.margins: Style.marginM * scaling
|
||||
text: passwordInput
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: Color.mOnSurface
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
clip: true
|
||||
|
|
@ -390,7 +390,7 @@ NLoader {
|
|||
Rectangle {
|
||||
Layout.preferredWidth: Style.baseWidgetSize * 2.5 * scaling
|
||||
Layout.preferredHeight: Style.barHeight * scaling
|
||||
radius: Style.radiusMedium * scaling
|
||||
radius: Style.radiusM * scaling
|
||||
color: Color.mPrimary
|
||||
|
||||
Behavior on color {
|
||||
|
|
@ -403,7 +403,7 @@ NLoader {
|
|||
anchors.centerIn: parent
|
||||
text: "Connect"
|
||||
color: Color.mSurface
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue