diff --git a/lookandfeel/contents/logout/LogoutScreen.qml b/lookandfeel/contents/logout/LogoutScreen.qml index 0b5176301..6160477fe 100644 --- a/lookandfeel/contents/logout/LogoutScreen.qml +++ b/lookandfeel/contents/logout/LogoutScreen.qml @@ -23,16 +23,18 @@ import QtQuick.Controls 1.1 as Controls import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras BreezeBlock { id: root property string mode: "shutdown" property var currentAction - property real remainingTime: 30 + property real timeout: 30 + property real remainingTime: root.timeout property bool canReboot property bool canLogout property bool canShutdown - onModeChanged: remainingTime = 30 + onModeChanged: remainingTime = root.timeout signal cancel() signal shutdownRequested() @@ -55,23 +57,31 @@ BreezeBlock { } mainItem: ColumnLayout { - PlasmaComponents.Label { + spacing: 0 + PlasmaExtras.Heading { id: actionLabel + level: 4 Layout.alignment: Qt.AlignHCenter } - PlasmaComponents.ToolButton { + Item { height: units.largeSpacing } + + Image { id: actionIcon Layout.alignment: Qt.AlignHCenter Layout.fillHeight: true - onClicked: root.currentAction() + fillMode: Image.PreserveAspectFit } PlasmaComponents.ProgressBar { id: progressBar Layout.alignment: Qt.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + + //wanted to use actionIcon.paintedWidth but it doesn't work well when the image changes + width: units.largeSpacing*7 minimumValue: 0 - maximumValue: 30 + maximumValue: root.timeout value: root.remainingTime } @@ -86,19 +96,19 @@ BreezeBlock { name: "shutdown" PropertyChanges { target: root; currentAction: shutdownRequested } PropertyChanges { target: actionLabel; text: ("Shutting down") } - PropertyChanges { target: actionIcon; iconSource: "system-shutdown" } + PropertyChanges { target: actionIcon; source: "icons/shutdown_primary.svgz" } }, State { name: "logout" - PropertyChanges { target: root; currentAction: shutdownRequested } + PropertyChanges { target: root; currentAction: logoutRequested } PropertyChanges { target: actionLabel; text: ("Logging out") } - PropertyChanges { target: actionIcon; iconSource: "system-log-out" } + PropertyChanges { target: actionIcon; source: "icons/logout_primary.svgz" } }, State { name: "reboot" PropertyChanges { target: root; currentAction: rebootRequested } PropertyChanges { target: actionLabel; text: ("Rebooting") } - PropertyChanges { target: actionIcon; iconSource: "system-reboot" } + PropertyChanges { target: actionIcon; source: "icons/restart_primary.svgz" } } ] } diff --git a/lookandfeel/contents/logout/icons/currentColorFillFix.sh b/lookandfeel/contents/logout/icons/currentColorFillFix.sh new file mode 100644 index 000000000..9705b1205 --- /dev/null +++ b/lookandfeel/contents/logout/icons/currentColorFillFix.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +if [ $# -ne 1 ]; + then echo Usage: $0 file.svgz + exit 1 +fi + +if [ ! -f $1 ]; then + echo "you must specify a valid svg" + exit 1 +fi + + +file=`echo $1 | cut -d'.' --complement -f2-` +mv $1 $file.svg.gz +gunzip $file.svg.gz + +echo Processing $file + +/usr/bin/perl -p -i -e "s/color:#[^;]*;fill:currentColor/fill:currentColor/g" $file.svg + +gzip $file.svg +mv $file.svg.gz $file.svgz \ No newline at end of file diff --git a/lookandfeel/contents/logout/icons/logout_primary.svgz b/lookandfeel/contents/logout/icons/logout_primary.svgz new file mode 100644 index 000000000..c3977ee4d Binary files /dev/null and b/lookandfeel/contents/logout/icons/logout_primary.svgz differ diff --git a/lookandfeel/contents/logout/icons/restart_primary.svgz b/lookandfeel/contents/logout/icons/restart_primary.svgz new file mode 100644 index 000000000..d97a67000 Binary files /dev/null and b/lookandfeel/contents/logout/icons/restart_primary.svgz differ diff --git a/lookandfeel/contents/logout/icons/shutdown_primary.svgz b/lookandfeel/contents/logout/icons/shutdown_primary.svgz new file mode 100644 index 000000000..d2f34ac5f Binary files /dev/null and b/lookandfeel/contents/logout/icons/shutdown_primary.svgz differ