mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 17:24:48 +00:00
kcms/mobiledata: Fix SIM lock page and page margins
This commit is contained in:
parent
fc97b0e241
commit
0aba11af83
3 changed files with 25 additions and 21 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Controls 2.12 as Controls
|
import QtQuick.Controls 2.12 as Controls
|
||||||
|
|
||||||
|
|
@ -95,9 +95,9 @@ FormCard.FormCardPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
RegExpValidator {
|
RegularExpressionValidator {
|
||||||
id: pinValidator
|
id: pinValidator
|
||||||
regExp: /[0-9]+/
|
regularExpression: /[0-9]+/
|
||||||
},
|
},
|
||||||
// dialogs
|
// dialogs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ FormCard.FormCardPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
|
Layout.topMargin: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
FormCard.FormSwitchDelegate {
|
FormCard.FormSwitchDelegate {
|
||||||
id: dataRoamingCheckBox
|
id: dataRoamingCheckBox
|
||||||
text: i18n("Data Roaming")
|
text: i18n("Data Roaming")
|
||||||
|
|
@ -91,7 +93,7 @@ FormCard.FormCardPage {
|
||||||
icon.name: "unlock"
|
icon.name: "unlock"
|
||||||
text: i18n("SIM Lock")
|
text: i18n("SIM Lock")
|
||||||
description: i18n("Modify SIM lock settings.")
|
description: i18n("Modify SIM lock settings.")
|
||||||
enabled: simEnabled
|
// enabled: simEnabled
|
||||||
onClicked: kcm.push("SimLockPage.qml", { "sim": sim });
|
onClicked: kcm.push("SimLockPage.qml", { "sim": sim });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,21 +25,6 @@ KCM.SimpleKCM {
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
|
||||||
id: noModem
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: parent.width - Kirigami.Units.gridUnit * 4
|
|
||||||
|
|
||||||
visible: !enabledConnections.wwanHwEnabled || !availableDevices.modemDeviceAvailable || !kcm.modemFound
|
|
||||||
icon.name: "auth-sim-missing"
|
|
||||||
text: i18n("Modem not available")
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
width: root.width
|
|
||||||
visible: !noModem.visible
|
|
||||||
|
|
||||||
PlasmaNM.Handler {
|
PlasmaNM.Handler {
|
||||||
id: nmHandler
|
id: nmHandler
|
||||||
}
|
}
|
||||||
|
|
@ -57,6 +42,21 @@ KCM.SimpleKCM {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kirigami.PlaceholderMessage {
|
||||||
|
id: noModem
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: parent.width - Kirigami.Units.gridUnit * 4
|
||||||
|
|
||||||
|
visible: !enabledConnections.wwanHwEnabled || !availableDevices.modemDeviceAvailable || !kcm.modemFound
|
||||||
|
icon.name: "auth-sim-missing"
|
||||||
|
text: i18n("Modem not available")
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
width: root.width
|
||||||
|
visible: !noModem.visible
|
||||||
|
|
||||||
MessagesList {
|
MessagesList {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.largeSpacing
|
Layout.margins: Kirigami.Units.largeSpacing
|
||||||
|
|
@ -64,6 +64,8 @@ KCM.SimpleKCM {
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
|
Layout.topMargin: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
FormCard.FormSwitchDelegate {
|
FormCard.FormSwitchDelegate {
|
||||||
id: mobileDataSwitch
|
id: mobileDataSwitch
|
||||||
text: i18n("Mobile data")
|
text: i18n("Mobile data")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue