[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace/mart/newLogoutScreen] lookandfeel/contents/logout: preliminary version of new logo
From: Marco Martin <notmart () gmail ! com>
Date: 2016-08-16 15:31:37
Message-ID: E1bZgL3-0003Gi-5f () code ! kde ! org
[Download RAW message or body]
Git commit 72296ab20eebf7263373cb270c9cf1efbf0d092b by Marco Martin.
Committed on 16/08/2016 at 15:30.
Pushed by mart into branch 'mart/newLogoutScreen'.
preliminary version of new logout screen
M +55 -25 lookandfeel/contents/logout/Logout.qml
C +29 -41 lookandfeel/contents/logout/LogoutButton.qml [from: lookandf=
eel/contents/logout/Logout.qml - 054% similarity]
http://commits.kde.org/plasma-workspace/72296ab20eebf7263373cb270c9cf1efbf0=
d092b
diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/=
logout/Logout.qml
index 337935a..146ef26 100644
--- a/lookandfeel/contents/logout/Logout.qml
+++ b/lookandfeel/contents/logout/Logout.qml
@@ -17,12 +17,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . =
*
*************************************************************************=
**/
=
-import QtQuick 2.1
-import "../components"
+import QtQuick 2.2
+import QtQuick.Layouts 1.2
=
-Item {
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.kcoreaddons 1.0 as KCoreAddons
+
+PlasmaCore.ColorScope {
+ colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
id: root
- height: units.largeSpacing*14
+ height: screenGeometry.height
width: screenGeometry.width
=
signal logoutRequested()
@@ -33,31 +38,56 @@ Item {
signal cancelRequested()
signal lockScreenRequested()
=
- LogoutScreen {
- anchors.fill: parent
-
- mode: switch (sdtype) {
- case ShutdownType.ShutdownTypeNone:
- return "logout";
- case ShutdownType.ShutdownTypeHalt:
- return maysd ? "shutdown" : "logout";
- case ShutdownType.ShutdownTypeReboot:
- return maysd ? "reboot" : "logout";
- default:
- return "logout";
- }
+ KCoreAddons.KUser {
+ id: kuser
+ }
=
- onShutdownRequested: {
- root.haltRequested()
+ UserDelegate {
+ width: units.iconSizes.enormous
+ height: width
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.verticalCenter
}
+ iconSource: kuser.faceIconUrl
+ isCurrent: true
+ name: kuser.fullName
+ }
+ ColumnLayout {
+ id: prompts
+ anchors {
+ top: parent.verticalCenter
+ topMargin: units.gridUnit * 0.5
+ horizontalCenter: parent.horizontalCenter
+ }
+
+ height: Math.max(implicitHeight, units.gridUnit * 10)
+ width: Math.max(implicitWidth, units.gridUnit * 16)
=
- onRebootRequested: {
- root.rebootRequested()
+ RowLayout {
+ spacing: units.largeSpacing
+ Layout.alignment: Qt.AlignHCenter
+ LogoutButton {
+ icon: "system-log-out"
+ text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Log=
out")
+ callback: root.logoutRequested
+ }
+ LogoutButton {
+ icon: "system-reboot"
+ text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reb=
oot")
+ callback: root.rebootRequested
+ }
+ LogoutButton {
+ icon: "system-shutdown"
+ text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Shu=
tdown")
+ callback: root.haltRequested
+ }
}
- canShutdown: maysd && choose
- canReboot: maysd && choose
- canLogout: true
=
- onCancel: root.cancelRequested()
+ PlasmaComponents.Button {
+ Layout.alignment: Qt.AlignHCenter
+ text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Cancel")
+ onClicked: root.cancelRequested()
+ }
}
}
diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/=
logout/LogoutButton.qml
similarity index 54%
copy from lookandfeel/contents/logout/Logout.qml
copy to lookandfeel/contents/logout/LogoutButton.qml
index 337935a..25bd94d 100644
--- a/lookandfeel/contents/logout/Logout.qml
+++ b/lookandfeel/contents/logout/LogoutButton.qml
@@ -1,5 +1,5 @@
/*************************************************************************=
**
- * Copyright (C) 2014 by Aleix Pol Gonzalez <aleixpol@blue-systems.com> =
*
+ * Copyright (C) 2016 by Marco MArtin <mart@kde.org> =
*
* =
*
* This program is free software; you can redistribute it and/or modify =
*
* it under the terms of the GNU General Public License as published by =
*
@@ -17,47 +17,35 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . =
*
*************************************************************************=
**/
=
-import QtQuick 2.1
-import "../components"
-
-Item {
- id: root
- height: units.largeSpacing*14
- width: screenGeometry.width
-
- signal logoutRequested()
- signal haltRequested()
- signal suspendRequested(int spdMethod)
- signal rebootRequested()
- signal rebootRequested2(int opt)
- signal cancelRequested()
- signal lockScreenRequested()
-
- LogoutScreen {
- anchors.fill: parent
-
- mode: switch (sdtype) {
- case ShutdownType.ShutdownTypeNone:
- return "logout";
- case ShutdownType.ShutdownTypeHalt:
- return maysd ? "shutdown" : "logout";
- case ShutdownType.ShutdownTypeReboot:
- return maysd ? "reboot" : "logout";
- default:
- return "logout";
+import QtQuick 2.2
+import QtQuick.Layouts 1.2
+
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
+
+MouseArea {
+ id: mouse
+ property alias icon: iconItem.source
+ property alias text: labelItem.text
+ property var callback
+ implicitWidth: layout.implicitWidth
+ implicitHeight: layout.implicitHeight
+ hoverEnabled: true
+
+ onClicked: callback();
+
+ ColumnLayout {
+ id: layout
+ PlasmaCore.IconItem {
+ id: iconItem
+ active: mouse.containsMouse
+ Layout.minimumWidth: units.iconSizes.huge
+ Layout.minimumHeight: Layout.minimumWidth
+ Layout.alignment: Qt.AlignHCenter
}
-
- onShutdownRequested: {
- root.haltRequested()
- }
-
- onRebootRequested: {
- root.rebootRequested()
+ PlasmaComponents.Label {
+ id: labelItem
+ Layout.alignment: Qt.AlignHCenter
}
- canShutdown: maysd && choose
- canReboot: maysd && choose
- canLogout: true
-
- onCancel: root.cancelRequested()
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic