Adopt artwork specific to the logout page

wilder-5.14
Aleix Pol 12 years ago
parent 4a77c91d83
commit 572e20817d
  1. 30
      lookandfeel/contents/logout/LogoutScreen.qml
  2. 23
      lookandfeel/contents/logout/icons/currentColorFillFix.sh
  3. BIN
      lookandfeel/contents/logout/icons/logout_primary.svgz
  4. BIN
      lookandfeel/contents/logout/icons/restart_primary.svgz
  5. BIN
      lookandfeel/contents/logout/icons/shutdown_primary.svgz

@ -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" }
}
]
}

@ -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
Loading…
Cancel
Save