kcms/mobiledata: Fix SIM lock page and page margins

This commit is contained in:
Devin Lin 2023-11-21 22:07:56 -08:00
parent fc97b0e241
commit 0aba11af83
3 changed files with 25 additions and 21 deletions

View file

@ -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

View file

@ -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 });
} }

View file

@ -25,6 +25,23 @@ KCM.SimpleKCM {
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
PlasmaNM.Handler {
id: nmHandler
}
PlasmaNM.AvailableDevices {
id: availableDevices
}
PlasmaNM.EnabledConnections {
id: enabledConnections
}
SimPage {
id: simPage
visible: false
}
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {
id: noModem id: noModem
anchors.centerIn: parent anchors.centerIn: parent
@ -40,23 +57,6 @@ KCM.SimpleKCM {
width: root.width width: root.width
visible: !noModem.visible visible: !noModem.visible
PlasmaNM.Handler {
id: nmHandler
}
PlasmaNM.AvailableDevices {
id: availableDevices
}
PlasmaNM.EnabledConnections {
id: enabledConnections
}
SimPage {
id: simPage
visible: false
}
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")