Verified Commit 662aa409 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

Fix whitespace

...and reorder some properties, signals, bindings and handlers into a
   more conventional form.

GIT_SILENT
parent 6568f4c6
......@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
......@@ -26,9 +27,10 @@ PlasmaComponents.Button {
property string label
property string normalLabel
property string accelLabel
text: parent.showAccel ? accelLabel : normalLabel
property int accelKey: -1
text: parent.showAccel ? accelLabel : normalLabel
onLabelChanged: {
var i = label.indexOf('&');
if (i < 0) {
......
......@@ -17,18 +17,23 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import QtQuick.Layouts 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
Item {
id: root
signal switchUserClicked()
signal canceled()
property alias notification: message.text
property bool switchUserEnabled
property bool capsLockOn
implicitWidth: layoutItem.width + theme.mSize(theme.defaultFont).width * 4 + 12
implicitHeight: layoutItem.height + 12
......@@ -40,8 +45,7 @@ Item {
Column {
id: layoutItem
anchors.centerIn: parent
spacing: theme.mSize(theme.defaultFont).height/2
spacing: theme.mSize(theme.defaultFont).height / 2
PlasmaComponents.Label {
id: message
......@@ -126,7 +130,7 @@ Item {
// focus munging is needed otherwise the greet (QWidget)
// eats all the key events, even if root is added to forwardTo
// qml property of greeter
// greeter.focus = false;
// greeter.focus = false;
root.forceActiveFocus();
var buttons = [switchUser, unlock]
......
......@@ -17,21 +17,22 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.private.sessions 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.private.sessions 2.0
Item {
id: lockScreen
signal unlockRequested()
property alias capsLockOn: unlockUI.capsLockOn
property bool locked: false
signal unlockRequested()
// if there's no image, have a near black background
Rectangle {
width: parent.width
......@@ -45,6 +46,7 @@ Item {
Image {
id: background
anchors.fill: parent
source: theme.wallpaperPathForSize(parent.width, parent.height)
smooth: true
......@@ -52,6 +54,7 @@ Item {
PlasmaCore.FrameSvgItem {
id: dialog
visible: lockScreen.locked
anchors.centerIn: parent
imagePath: "widgets/background"
......@@ -72,6 +75,7 @@ Item {
}
PlasmaComponents.PageStack {
id: mainStack
clip: true
anchors {
fill: parent
......@@ -110,6 +114,7 @@ Item {
SessionSwitching {
id: userSessionsUI
visible: false
Connections {
......
......@@ -17,19 +17,22 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
Item {
readonly property bool switchUserSupported: sessionsModel.canSwitchUser
implicitWidth: theme.mSize(theme.defaultFont).width * 55
implicitHeight: theme.mSize(theme.defaultFont).height * 25
signal sessionActivated()
signal newSessionStarted()
signal switchingCanceled()
implicitWidth: theme.mSize(theme.defaultFont).width * 55
implicitHeight: theme.mSize(theme.defaultFont).height * 25
anchors {
fill: parent
margins: 6
......@@ -46,6 +49,7 @@ Item {
ListView {
id: userSessionsView
model: sessionsModel
anchors.fill: parent
......@@ -69,6 +73,7 @@ Item {
width: parent.width
}
focus: true
MouseArea {
anchors.fill: parent
onClicked: userSessionsView.currentIndex = userSessionsView.indexAt(mouse.x, mouse.y)
......
......@@ -20,25 +20,32 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.14
import QtQuick.Controls 2.14 as QQC2
import QtQuick.Layouts 1.14
import org.kde.kcm 1.5 as KCM
import org.kde.kirigami 2.12 as Kirigami
Kirigami.Page {
title: i18nc("@title", "Appearance")
//Plugins expect these two properties
// Plugins expect these two properties
property var wallpaper: kcm.wallpaperIntegration
property var configDialog: kcm
title: i18nc("@title", "Appearance")
ColumnLayout {
anchors.fill: parent
LnfConfig {
sourceFile: kcm.lnfConfigFile
onConfigurationChanged: kcm.updateState()
}
Kirigami.FormLayout {
id: parentLayout // Don't change needed for correct alignment with lnf and wallpaper config
QQC2.ComboBox {
Kirigami.FormData.label: i18n("Wallpaper type:")
model: kcm.availableWallpaperPlugins()
......@@ -46,15 +53,18 @@ Kirigami.Page {
valueRole: "id"
currentIndex: model.findIndex(wallpaper => wallpaper["id"] === kcm.settings.wallpaperPluginId)
displayText: model[currentIndex]["name"]
onActivated: {
kcm.settings.wallpaperPluginId = model[index]["id"]
}
KCM.SettingStateBinding {
configObject: kcm.settings
settingName: "wallpaperPluginId"
}
}
}
WallpaperConfig {
sourceFile: kcm.wallpaperConfigFile
onConfigurationChanged: kcm.updateState()
......
......@@ -21,16 +21,21 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import QtQuick.Controls 2.0 as QtControls
import QtQuick.Layouts 1.1
QtControls.StackView {
id: main
signal configurationChanged
property string sourceFile
implicitHeight: currentItem && currentItem.implicitHeight || 0
Layout.fillWidth: true
onSourceFileChanged: {
pop()
if (sourceFile) {
......@@ -65,6 +70,7 @@ QtControls.StackView {
push(empty)
}
}
Component {
id: empty
Item {}
......
......@@ -21,9 +21,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.0
import QtQuick.Controls 2.15 as QtControls
import QtQuick.Layouts 1.1
QtControls.StackView {
id: main
Layout.fillHeight: true
......@@ -65,6 +67,7 @@ QtControls.StackView {
replace(empty)
}
}
Component {
id: empty
Item {}
......
......@@ -24,21 +24,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.14
import QtQuick.Controls 2.14 as QQC2
import QtQuick.Layouts 1.14
import org.kde.kcm 1.5 as KCM
import org.kde.kirigami 2.12 as Kirigami
import org.kde.kquickcontrols 2.0 as KQuickControls
KCM.SimpleKCM {
id: root
implicitHeight: 800
implicitWidth: 800
id: root
ColumnLayout {
spacing: 0
Kirigami.FormLayout {
RowLayout {
Kirigami.FormData.label: i18n("Lock screen automatically:")
QQC2.CheckBox {
text: i18nc("First part of sentence \"Automatically after X minutes\"","After")
text: i18nc("First part of sentence \"Automatically after X minutes\"", "After")
checked: kcm.settings.autolock
onToggled: kcm.settings.autolock = checked
......@@ -47,6 +51,7 @@ KCM.SimpleKCM {
settingName: "Autolock"
}
}
QQC2.SpinBox {
from: 1
editable: true
......@@ -65,8 +70,9 @@ KCM.SimpleKCM {
}
}
}
QQC2.CheckBox {
text: i18nc("@option:check","After waking from sleep")
text: i18nc("@option:check", "After waking from sleep")
checked: kcm.settings.lockOnResume
onToggled: kcm.settings.lockOnResume = checked
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment