[Blends-commit] [SCM] ezgo branch, master, updated. 36a7b9f34d40b881f7b5b8cce26c331e832b9c37
Franklin Weng
franklin at goodhorse.idv.tw
Thu Apr 10 09:15:47 UTC 2014
The following commit has been merged in the master branch:
commit 36a7b9f34d40b881f7b5b8cce26c331e832b9c37
Author: Franklin Weng <franklin at goodhorse.idv.tw>
Date: Thu Apr 10 17:15:35 2014 +0800
Add KDE/unity lightdm and unity background (glib schema) support.
diff --git a/debian/ezgo-artwork.install b/debian/ezgo-artwork.install
index edee8df..dd9dcd2 100644
--- a/debian/ezgo-artwork.install
+++ b/debian/ezgo-artwork.install
@@ -18,3 +18,5 @@ ezgo-artwork/kde/update-artwork usr/share/ezgo/ezgo-artwork
ezgo-artwork/grub/*.png usr/share/ezgo/grub
ezgo-artwork/gnome/50_ezgo-gnome-settings.gschema.override usr/share/glib-2.0/schemas
ezgo-artwork/ldm/* usr/share/ldm/themes/ezgo
+ezgo-artwork/lightdm-kde-greeter/* usr/share/kde4/apps/lightdm-kde-greeter/themes/ezgo
+ezgo-artwork/lightdm-kde-greeter/private/* usr/share/kde4/apps/lightdm-kde-greeter/themes/ezgo/private
diff --git a/ezgo-artwork/gnome/50_ezgo-gnome-settings.gschema.override b/ezgo-artwork/gnome/50_ezgo-gnome-settings.gschema.override
index 69024ea..d77bc7f 100644
--- a/ezgo-artwork/gnome/50_ezgo-gnome-settings.gschema.override
+++ b/ezgo-artwork/gnome/50_ezgo-gnome-settings.gschema.override
@@ -1,3 +1,6 @@
[org.gnome.desktop.background]
show-desktop-icons=true
picture-uri='file:///usr/share/ezgo/wallpaper/blue_1440_d.png'
+
+[com.canonical.unity-greeter]
+background='/usr/share/ezgo/wallpaper/blue_1440_blur.png'
diff --git a/ezgo-artwork/kde/update-artwork b/ezgo-artwork/kde/update-artwork
index cbb2b56..ffde465 100755
--- a/ezgo-artwork/kde/update-artwork
+++ b/ezgo-artwork/kde/update-artwork
@@ -1,6 +1,23 @@
#! /bin/sh
set -e
+# Lightdm-kde-greeter
+change_lightdm_kde_theme() {
+ if [ -f /etc/lightdm/lightdm-kde-greeter.conf ]; then
+ mv /etc/lightdm/lightdm-kde-greeter.conf /etc/lightdm/lightdm-kde-greeter.conf.ezgo-bak
+ cp -f /usr/share/kde4/apps/lightdm-kde-greeter/themes/ezgo/lightdm-kde-greeter.conf /etc/lightdm/lightdm-kde-greeter.conf.ezgo
+ ln -s /etc/lightdm/lightdm-kde-greeter.conf.ezgo /etc/lightdm/lightdm-kde-greeter.conf
+ fi
+}
+
+restore_lightdm_kde_theme() {
+ if [ -f /etc/lightdm/lightdm-kde-greeter.conf.ezgo-bak ]; then
+ rm -f /etc/lightdm/lightdm-kde-greeter.conf
+ mv /etc/lightdm/lightdm-kde-greeter.conf.ezgo-bak /etc/lightdm/lightdm-kde-greeter.conf
+ fi
+}
+
+# LDM
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
ldm-theme /usr/share/ldm/themes/ezgo 90
@@ -82,23 +99,25 @@ restore_ksplash() {
/usr/share/kde4/apps/kdm/themes/ezgo/background.png
}
-# compile_gschemas() {
-# glib-compile-schemas /usr/share/glib-2.0/schemas/
-# }
+compile_gschemas() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas/
+}
case "$1" in
configure)
+ change_lightdm_kde_theme
change_ldm_background
change_grub_background
change_desktop_background
change_ksplash
-# compile_gschemas
+ compile_gschemas
;;
remove)
+ restore_lightdm_kde_theme
restore_ldm_background
restore_grub_background
restore_desktop_background
restore_ksplash
-# compile_gschemas
+ compile_gschemas
;;
esac
diff --git a/ezgo-artwork/lightdm-kde-greeter/Face.qml b/ezgo-artwork/lightdm-kde-greeter/Face.qml
new file mode 100644
index 0000000..e7d8eea
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/Face.qml
@@ -0,0 +1,23 @@
+/*
+This file is part of LightDM-KDE.
+
+Copyright 2011, 2012 David Edmundson <kde at davidedmundson.co.uk>
+
+LightDM-KDE is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+LightDM-KDE is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
+*/
+import QtQuick 1.0
+
+Image {
+ height: width
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/FeedbackLabel.qml b/ezgo-artwork/lightdm-kde-greeter/FeedbackLabel.qml
new file mode 100644
index 0000000..370e007
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/FeedbackLabel.qml
@@ -0,0 +1,75 @@
+/*
+This file is part of LightDM-KDE.
+
+Copyright 2011, 2012 David Edmundson <kde at davidedmundson.co.uk>
+
+LightDM-KDE is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+LightDM-KDE is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
+*/
+import QtQuick 1.0
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+
+PlasmaCore.FrameSvgItem {
+ id: frame
+ imagePath: "translucent/dialogs/background"
+ opacity: 0
+ property alias text: textItem.text
+ property alias font: textItem.font
+
+ property int padding: 18
+
+ width: childrenRect.width + 2 * padding
+ height: childrenRect.height + 2 * padding
+
+ function showFeedback() {
+ anim.start();
+ }
+
+ SequentialAnimation {
+ id: anim
+ PropertyAnimation {
+ target: frame
+ properties: "opacity"
+ from: 0
+ to: 1
+ duration: 100
+ }
+ PauseAnimation {
+ duration: 6000
+ }
+ PropertyAnimation {
+ target: frame
+ properties: "opacity"
+ to: 0
+ duration: 200
+ }
+ }
+
+ Image {
+ id: icon
+ x: padding
+ y: padding
+ width: 22
+ height: width
+ source: "image://icon/dialog-error.png"
+ }
+
+ PlasmaComponents.Label {
+ id: textItem
+ anchors.left: icon.right
+ anchors.leftMargin: 6
+ anchors.verticalCenter: icon.verticalCenter
+ }
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/ListButton.qml b/ezgo-artwork/lightdm-kde-greeter/ListButton.qml
new file mode 100644
index 0000000..79f98b9
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/ListButton.qml
@@ -0,0 +1,155 @@
+/*
+This file is part of LightDM-KDE.
+
+Copyright 2012 Aurélien Gâteau <agateau at kde.org>
+
+LightDM-KDE is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+LightDM-KDE is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
+*/
+import QtQuick 1.0
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+FocusScope {
+ id: root
+ property int currentIndex: 0
+ property string dataRole: ""
+ property alias model: repeater.model
+
+ function dataForIndex(index) {
+ var button = repeater.itemAt(index);
+ return button.data;
+ }
+
+ function indexForData(data) {
+ var index;
+ for (index = 0; index < repeater.count; ++index) {
+ if (repeater.itemAt(index).data == data) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ function indexForItem(item) {
+ var index;
+ for (index = 0; index < repeater.count; ++index) {
+ if (repeater.itemAt(index) == item) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ states: [
+ State {
+ name: "closed"
+ },
+ State {
+ name: "opened"
+ }
+ ]
+ state: "closed"
+
+ onActiveFocusChanged: {
+ root.state = activeFocus ? "opened" : "closed";
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: mainFrame
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: column.width + margins.left + margins.right
+ height: column.height + margins.top + margins.bottom
+ imagePath: "widgets/button"
+ prefix: "normal"
+ clip: true
+
+ PlasmaComponents.ButtonColumn {
+ id: column
+ spacing: 2 // Give some room
+
+ x: parent.margins.left
+ y: parent.margins.top
+ width: childrenRect.width
+
+ Repeater {
+ id: repeater
+ PlasmaComponents.Label {
+ property string data: model[root.dataRole]
+ property bool isCurrent: root.currentIndex == model.index
+
+ text: model.display
+ font.bold: isCurrent && root.state == "opened"
+ visible: isCurrent || root.state == "opened"
+ }
+ }
+ }
+
+ Behavior on width {
+ NumberAnimation { duration: 100 }
+ }
+ Behavior on height {
+ NumberAnimation { duration: 100 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (root.state == "opened") {
+ var item = column.childAt(parent.margins.left, mouse.y);
+ var index = indexForItem(item);
+ if (index >= 0) {
+ root.currentIndex = index;
+ root.state = "closed";
+ }
+ } else {
+ root.forceActiveFocus();
+ root.state = "opened";
+ }
+ }
+ }
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: focusFrame
+ anchors {
+ fill: mainFrame
+ leftMargin: -margins.left
+ topMargin: -margins.top
+ rightMargin: -margins.right
+ bottomMargin: -margins.bottom
+ }
+ width: parent.width
+ height: column.height + margins.top + margins.bottom
+ imagePath: "widgets/button"
+ prefix: "hover"
+ opacity: root.activeFocus ? 1 : 0
+ Behavior on opacity {
+ PropertyAnimation { duration: 100 }
+ }
+ }
+
+ Keys.onUpPressed: {
+ if (root.currentIndex > 0) {
+ root.currentIndex--;
+ }
+ }
+ Keys.onDownPressed: {
+ if (root.currentIndex < repeater.count - 1) {
+ root.currentIndex++;
+ }
+ }
+ Keys.onReturnPressed: {
+ root.state = root.state == "opened" ? "closed" : "opened";
+ }
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/Messages.sh b/ezgo-artwork/lightdm-kde-greeter/Messages.sh
new file mode 100755
index 0000000..b8fb1ee
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/Messages.sh
@@ -0,0 +1,4 @@
+#! /usr/bin/env bash
+$EXTRACTRC `find . -name \*.rc -a ! -name theme.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
+$XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/lightdm_theme_userbar.pot
+rm -f rc.cpp
diff --git a/ezgo-artwork/lightdm-kde-greeter/TextField.qml b/ezgo-artwork/lightdm-kde-greeter/TextField.qml
new file mode 100644
index 0000000..d4c832b
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/TextField.qml
@@ -0,0 +1,337 @@
+/*
+* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp at gmail.com>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Library General Public License as
+* published by the Free Software Foundation; either version 2, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details
+*
+* You should have received a copy of the GNU Library General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/**Documented API
+Inherits:
+ Item
+
+Imports:
+ QtQuick 1.1
+
+Description:
+ Creates a simple plasma theme based text field widget.
+
+Properties:
+ * font font:
+ This property holds the font used in the text field.
+ The default font value is the font from plasma desktop theme.
+
+ * Qt::InputMethodHints inputMethodHints:
+ This property holds the the currently supported input method hints
+ for the text field.
+ The default values is Qt.ImhNone.
+
+ * bool errorHighlight:
+ This property holds if the text field is highlighted or not
+ If it is true then the problematic lines will be highlighted.
+ This feature is defined in the Common API but is unimplemented in plasma components.
+
+ * int cursorPosition:
+ This property holds the current cursor position.
+
+ * bool readOnly:
+ This property holds if the text field can be modified by the user interaction.
+ The default value is false.
+
+ * string selectedText:
+ This property holds the text selected by the user.
+ If no text is selected it holds an empty string.
+ This property is read-only.
+
+ * int selectionEnd:
+ This property holds the cursor position after the last character in the current selection.
+ This property is read-only.
+
+ * int selectionStart:
+ This property holds the cursor position before the first character in the current selection.
+ This property is read-only.
+
+ * string text:
+ This property holds the entire text in the text field.
+
+ * string placeholderText:
+ This property holds the text displayed in when the text is empty.
+ The default value is empty string, meaning no placeholderText shown.
+
+ * enumeration echoMode:
+ This property specifies how the text should be displayed in the TextField.
+ The acceptable values are:
+ - TextInput.Normal - Displays the text as it is. (Default)
+ - TextInput.Password - Displays asterixes instead of characters.
+ - TextInput.NoEcho - Displays nothing.
+ - TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes.
+ The default value is TextInput.Normal
+
+ * string inputMask:
+ Allows you to set an input mask on the TextField, restricting the allowable text inputs.
+ See QLineEdit::inputMask for further details, as the exact same mask strings are used by TextInput.
+
+ * Validator validator:
+ Allows you to set a validator on the TextField. When a validator is set the TextField
+ will only accept input which leaves the text property in an acceptable or intermediate state.
+ The accepted signal will only be sent if the text is in an acceptable state when enter is pressed.
+ Currently supported validators are IntValidator, DoubleValidator and RegExpValidator.
+ An example of using validators is shown below, which allows input of integers
+ between 11 and 31 into the text input:
+ <code>
+ import QtQuick 1.0
+ TextInput {
+ validator: IntValidator{bottom: 11; top: 31;}
+ focus: true
+ }
+ </code>
+
+ * int maximumLength:
+ The maximum permitted length of the text in the TextField.
+ If the text is too long, it is truncated at the limit.
+ By default, this property contains a value of 32767.
+
+ * bool acceptableInput:
+ This property is always true unless a validator or input mask has been set.
+ If a validator or input mask has been set, this property will only be true if the current
+ text is acceptable to the validator or input mask as a final string (not as an intermediate string).
+ This property is always true unless a validator has been set.
+ If a validator has been set, this property will only be true if the current text is acceptable to the
+ validator as a final string (not as an intermediate string).
+ This property is read-only.
+
+ * bool clearButtonShown:
+ Holds if the button to clear the text from TextField is visible.
+Signals:
+ * accepted():
+ This signal is emitted when the text input is accepted.
+
+Methods:
+ * void copy():
+ Copies the currently selected text to the system clipboard.
+
+ * void cut():
+ Moves the currently selected text to the system clipboard.
+
+ * void deselect():
+ Removes active text selection.
+
+ * void paste():
+ Replaces the currently selected text by the contents of the system clipboard.
+
+ * void select(int start, int end):
+ Causes the text from start to end to be selected.
+ If either start or end is out of range, the selection is not changed.
+ After calling this, selectionStart will become the lesser and selectionEnd will become the greater
+ (regardless of the order passed to this method).
+
+ * void selectAll():
+ Causes all text to be selected.
+
+ * void selectWord():
+ Causes the word closest to the current cursor position to be selected.
+
+ * void positionAt(int position):
+ This function returns the character position at x pixels from the left of the TextField.
+ Position 0 is before the first character, position 1 is after the first character but before the second,
+ and so on until position text.length, which is after all characters.
+ This means that for all x values before the first character this function returns 0,
+ and for all x values after the last character this function returns text.length.
+
+ * rectangle positionToRectangle(position):
+ Returns the rectangle at the given position in the text.
+ The x, y, and height properties correspond to the cursor that would describe that position.
+**/
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import "private" as Private
+
+FocusScope {
+ id: textField
+
+ // Common API
+ property bool errorHighlight: false // TODO
+ property string placeholderText
+ property alias inputMethodHints: textInput.inputMethodHints
+ property alias font: textInput.font
+
+ property alias cursorPosition: textInput.cursorPosition
+ property alias readOnly: textInput.readOnly
+ property alias echoMode: textInput.echoMode // Supports TextInput.Normal,TextInput.Password, TextInput.NoEcho, TextInput.PasswordEchoOnEdit
+ property alias passwordCharacter: textInput.passwordCharacter
+ property alias acceptableInput: textInput.acceptableInput // read-only
+ property alias inputMask: textInput.inputMask
+ property alias validator: textInput.validator
+ property alias selectedText: textInput.selectedText // read-only
+ property alias selectionEnd: textInput.selectionEnd // read-only
+ property alias selectionStart: textInput.selectionStart // read-only
+ property alias text: textInput.text
+ property alias maximumLength: textInput.maximumLength
+
+ signal accepted
+
+ //Plasma api
+ property bool clearButtonShown: false
+
+ function copy() {
+ textInput.copy();
+ }
+
+ function paste() {
+ textInput.paste();
+ }
+
+ function cut() {
+ textInput.cut();
+ }
+
+ function select(start, end) {
+ textInput.select(start, end);
+ }
+
+ function selectAll() {
+ textInput.selectAll();
+ }
+
+ function selectWord() {
+ textInput.selectWord();
+ }
+
+ function positionAt(pos) {
+ return textInput.positionAt(pos);
+ }
+
+ function positionToRectangle(pos) {
+ return textInput.positionToRectangle(pos);
+ }
+
+
+ // Set active focus to it's internal textInput.
+ // Overriding QtQuick.Item forceActiveFocus function.
+ function forceActiveFocus() {
+ textInput.forceActiveFocus();
+ }
+
+ // Overriding QtQuick.Item activeFocus property.
+ property alias activeFocus: textInput.activeFocus
+
+ // TODO: fix default size
+ implicitWidth: theme.defaultFont.mSize.width*12
+ implicitHeight: theme.defaultFont.mSize.height*1.6
+ // TODO: needs to define if there will be specific graphics for
+ // disabled text fields
+ opacity: enabled ? 1.0 : 0.5
+
+ Private.TextFieldFocus {
+ id: hover
+ state: textInput.activeFocus ? "focus" : (mouseWatcher.containsMouse ? "hover" : "hidden")
+ anchors.fill: base
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: base
+
+ // TODO: see what is the correct policy for margins
+ anchors.fill: parent
+ imagePath: "widgets/lineedit"
+ prefix: "base"
+ }
+
+ MouseArea {
+ id: mouseWatcher
+ anchors.fill: hover
+ hoverEnabled: true
+ onClicked: {
+ textInput.forceActiveFocus();
+ }
+ }
+
+ Text {
+ anchors {
+ left: parent.left
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ leftMargin: 2 * base.margins.left
+ rightMargin: 2 * base.margins.right
+ }
+ text: placeholderText
+ visible: textInput.text == "" && !textField.activeFocus
+ // XXX: using textColor and low opacity for theming placeholderText
+ color: theme.viewTextColor
+ opacity: 0.5
+ elide: Text.ElideRight
+ clip: true
+ font.capitalization: theme.defaultFont.capitalization
+ font.family: theme.defaultFont.family
+ font.italic: theme.defaultFont.italic
+ font.letterSpacing: theme.defaultFont.letterSpacing
+ font.pointSize: theme.defaultFont.pointSize
+ font.strikeout: theme.defaultFont.strikeout
+ font.underline: theme.defaultFont.underline
+ font.weight: theme.defaultFont.weight
+ font.wordSpacing: theme.defaultFont.wordSpacing
+ }
+
+ TextInput {
+ id: textInput
+
+ anchors {
+ left: parent.left
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ // TODO: see what is the correct policy for margins
+ leftMargin: 2 * base.margins.left
+ rightMargin: 2 * base.margins.right + (clearButton.opacity > 0 ? clearButton.width : 0)
+ }
+ passwordCharacter: "•"
+ selectByMouse: true
+ color: theme.textColor
+ enabled: textField.enabled
+ clip: true
+ focus: true
+ onActiveFocusChanged: {
+ if (!textField.activeFocus) {
+ textInput.closeSoftwareInputPanel()
+ }
+ }
+ onAccepted: textField.accepted()
+ }
+
+ Private.IconLoader {
+ id: clearButton
+ source: "edit-clear-locationbar-rtl"
+ height: Math.max(textInput.height, theme.smallIconSize)
+ width: height
+ opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 250
+ easing.type: Easing.InOutQuad
+ }
+ }
+ anchors {
+ right: parent.right
+ rightMargin: y
+ verticalCenter: textInput.verticalCenter
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ textInput.text = ""
+ textInput.forceActiveFocus()
+ }
+ }
+ }
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/ToolButton.qml b/ezgo-artwork/lightdm-kde-greeter/ToolButton.qml
new file mode 100644
index 0000000..20e4efb
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/ToolButton.qml
@@ -0,0 +1,243 @@
+/*
+* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp at gmail.com>
+* Copyright (C) 2011 by Marco Martin <mart at kde.org>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Library General Public License as
+* published by the Free Software Foundation; either version 2, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Library General Public License for more details
+*
+* You should have received a copy of the GNU Library General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/**Documented API
+Inherits:
+ Item
+
+Imports:
+ QtQuick 1.1
+ org.kde.plasma.core
+
+Description:
+ A plasma theme based toolbutton.
+
+Properties:
+ bool flat:
+ Returns true if the button is flat.
+
+ bool checked: false
+ Returns true if the button is checked.
+
+ bool checkable:
+ Returns true if the button is checkable.
+
+ bool pressed:
+ Returns true if the button is pressed.
+ alias text:
+ Sets the text for the button.
+
+ variant iconSource:
+ Sets the icon for the button.
+ It can be any image from any protocol supported by the Image element, or a freedesktop-compatible icon name
+
+ string font:
+ Sets the font for the button.
+
+Signals:
+ onClicked:
+ The signal is being emmited when the button is being clicked.
+**/
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import "private" as Private
+
+FocusScope {
+ id: button
+
+ // Commmon API
+ property bool flat: true
+ property bool checked: defaultAction ? defaultAction.checked : false
+ property bool checkable: defaultAction ? defaultAction.checkable : false
+ property alias pressed: mouse.pressed
+ property alias text: label.text
+ property alias iconSource: icon.source
+ property alias font: label.font
+
+ signal clicked()
+
+ // Plasma extensiuons
+ property QtObject defaultAction
+
+
+ enabled: defaultAction==undefined||defaultAction.enabled
+
+ implicitWidth: {
+ if (label.paintedWidth == 0) {
+ return implicitHeight
+ } else {
+ return icon.width + label.paintedWidth + surface.margins.left + surface.margins.right + ((icon.valid) ? surface.margins.left : 0)
+ }
+ }
+ implicitHeight: Math.max(theme.defaultFont.mSize.height*1.6, Math.max(icon.height, label.paintedHeight) + surface.margins.top/2 + surface.margins.bottom/2)
+
+ // TODO: needs to define if there will be specific graphics for
+ // disabled buttons
+ opacity: enabled ? 1.0 : 0.5
+
+ Keys.onSpacePressed: internal.userPressed = true
+ Keys.onReturnPressed: internal.userPressed = true
+ Keys.onReleased: {
+ internal.userPressed = false
+ if (event.key == Qt.Key_Space ||
+ event.key == Qt.Key_Return)
+ internal.clickButton()
+ }
+
+ onActiveFocusChanged: {
+ if (activeFocus) {
+ shadow.state = "focus"
+ } else if (checked) {
+ shadow.state = "hidden"
+ } else {
+ shadow.state = "shadow"
+ }
+ }
+
+ QtObject {
+ id: internal
+ property bool userPressed: false
+
+ function clickButton()
+ {
+ if (!button.enabled) {
+ return
+ }
+
+ if (defaultAction && defaultAction.checkable) {
+ defaultAction.checked = !defaultAction.checked
+ } else if (button.checkable) {
+ button.checked = !button.checked
+ }
+
+ button.clicked()
+ button.forceActiveFocus()
+
+ if (defaultAction) {
+ defaultAction.trigger()
+ }
+ }
+ }
+
+ Private.ButtonShadow {
+ id: shadow
+ anchors.fill: parent
+ visible: !flat
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: surface
+
+ anchors.fill: parent
+ imagePath: "widgets/button"
+ prefix: (internal.userPressed || checked) ? "pressed" : "normal"
+ //internal: if there is no hover status, don't paint on mouse over in touchscreens
+ opacity: (internal.userPressed || checked || !flat || parent.activeFocus || (shadow.hasOverState && mouse.containsMouse)) ? 1 : 0
+ Behavior on opacity {
+ PropertyAnimation { duration: 100 }
+ }
+ }
+
+ Item {
+ anchors {
+ fill: parent
+ leftMargin: surface.margins.left
+ topMargin: surface.margins.top
+ rightMargin: surface.margins.right
+ bottomMargin: surface.margins.bottom
+ }
+ scale: internal.userPressed ? 0.9 : 1
+ Behavior on scale {
+ PropertyAnimation { duration: 250 }
+ }
+
+ Private.IconLoader {
+ id: icon
+
+ anchors {
+ verticalCenter: parent.verticalCenter
+ left: label.text ? parent.left : undefined
+ horizontalCenter: label.text ? undefined : parent.horizontalCenter
+ }
+ height: roundToStandardSize(parent.height)
+ width: height
+ }
+
+ Text {
+ id: label
+
+ //FIXME: why this is needed?
+ onPaintedWidthChanged: {
+ icon.anchors.horizontalCenter = label.paintedWidth > 0 ? undefined : icon.parent.horizontalCenter
+ icon.anchors.left = label.paintedWidth > 0 ? icon.parent.left : undefined
+ }
+
+ anchors {
+ top: parent.top
+ bottom: parent.bottom
+ left: icon.valid ? icon.right : parent.left
+ right: parent.right
+ leftMargin: icon.valid ? surface.margins.left : 0
+ }
+ font.capitalization: theme.defaultFont.capitalization
+ font.family: theme.defaultFont.family
+ font.italic: theme.defaultFont.italic
+ font.letterSpacing: theme.defaultFont.letterSpacing
+ font.pointSize: theme.defaultFont.pointSize
+ font.strikeout: theme.defaultFont.strikeout
+ font.underline: theme.defaultFont.underline
+ font.weight: theme.defaultFont.weight
+ font.wordSpacing: theme.defaultFont.wordSpacing
+ color: theme.buttonTextColor
+ horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+ }
+
+ MouseArea {
+ id: mouse
+
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onPressed: internal.userPressed = true
+ onReleased: internal.userPressed = false
+ onClicked: internal.clickButton()
+
+ onEntered: {
+ if (!flat) {
+ shadow.state = "hover"
+ }
+ }
+ onExited: {
+ if (!flat) {
+ if (button.activeFocus) {
+ shadow.state = "focus"
+ } else if (checked) {
+ shadow.state = "hidden"
+ } else {
+ shadow.state = "shadow"
+ }
+ }
+ }
+ }
+}
+
diff --git a/ezgo-artwork/lightdm-kde-greeter/config.ui b/ezgo-artwork/lightdm-kde-greeter/config.ui
new file mode 100644
index 0000000..78fceee
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/config.ui
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>widget</class>
+ <widget class="QWidget" name="widget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>267</width>
+ <height>131</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Background Image:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="SelectImageButton" name="kcfg_Background">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SelectImageButton</class>
+ <extends>QToolButton</extends>
+ <header>selectimagebutton.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ezgo-artwork/lightdm-kde-greeter/lightdm-kde-greeter.conf b/ezgo-artwork/lightdm-kde-greeter/lightdm-kde-greeter.conf
new file mode 100644
index 0000000..d1c31c9
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/lightdm-kde-greeter.conf
@@ -0,0 +1,2 @@
+[greeter]
+theme-name=ezgo
diff --git a/ezgo-artwork/lightdm-kde-greeter/main.qml b/ezgo-artwork/lightdm-kde-greeter/main.qml
new file mode 100644
index 0000000..a9a99fc
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/main.qml
@@ -0,0 +1,366 @@
+/*
+This file is part of LightDM-KDE.
+
+Copyright 2011, 2012 David Edmundson <kde at davidedmundson.co.uk>
+
+LightDM-KDE is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+LightDM-KDE is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
+*/
+import QtQuick 1.0
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+Item {
+ id: screen
+ width: screenSize.width;
+ height: screenSize.height;
+
+ property string guestLogin: "*guest"
+
+ Image {
+ fillMode: Image.PreserveAspectCrop
+ source: config.readEntry("Background") ? config.readEntry("Background"): plasmaTheme.wallpaperPath();
+ anchors.fill: parent
+ visible: source != ""
+ smooth: true
+ }
+
+ Connections {
+ target: greeter;
+
+ onShowPrompt: {
+ greeter.respond(passwordInput.text);
+ }
+
+ onAuthenticationComplete: {
+ var session = sessionButton.dataForIndex(sessionButton.currentIndex);
+ console.log("session: " + session);
+ if (session == "") {
+ session = "default";
+ }
+ if(greeter.authenticated) {
+ greeter.startSessionSync(session);
+ } else {
+ feedbackLabel.text = i18n("Sorry, incorrect password. Please try again.");
+ feedbackLabel.showFeedback();
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ setTabOrder([usersList, loginButtonItem, sessionButton, suspendButton, hibernateButton, restartButton, shutdownButton]);
+ usersList.forceActiveFocus();
+ }
+
+ function setTabOrder(lst) {
+ var idx;
+ var lastIdx = lst.length - 1;
+ for (idx = 0; idx <= lastIdx; ++idx) {
+ var item = lst[idx];
+ item.KeyNavigation.backtab = lst[idx > 0 ? idx - 1 : lastIdx];
+ item.KeyNavigation.tab = lst[idx < lastIdx ? idx + 1 : 0];
+ }
+ }
+
+ PlasmaComponents.Label {
+ id: welcomeLabel
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 5
+ font.pointSize: 14
+ text: i18n("Welcome to %1", greeter.hostname);
+ }
+
+ FeedbackLabel {
+ id: feedbackLabel
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: welcomeLabel.bottom
+ anchors.topMargin: 5
+ font.pointSize: 14
+ }
+
+ property int userItemWidth: 120
+ property int userItemHeight: 80
+ property int userFaceSize: 64
+
+ property int padding: 6
+
+ Component {
+ id: userDelegate
+
+ Item {
+ id: wrapper
+
+ property bool isCurrent: ListView.isCurrentItem
+ property bool activeFocus: ListView.view.activeFocus
+
+ /* Expose current item info to the outer world. I can't find
+ * another way to access this from outside the list. */
+ property string username: model.name
+ property string usersession: model.session
+
+ width: userItemWidth
+ height: userItemHeight
+
+ opacity: isCurrent ? 1.0 : 0.618
+
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 250
+ }
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: frameFocus
+ anchors {
+ fill: frame
+ leftMargin: -margins.left
+ topMargin: -margins.top
+ bottomMargin: -margins.bottom
+ rightMargin: -margins.right
+ }
+ imagePath: "widgets/button"
+ prefix: "hover"
+ visible: wrapper.isCurrent
+ opacity: wrapper.activeFocus ? 1 : 0
+ Behavior on opacity {
+ NumberAnimation { duration: 100 }
+ }
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: frame
+ anchors.centerIn: face
+ width: face.width + padding * 2
+ height: face.height + padding * 2
+ imagePath: "widgets/lineedit"
+ prefix: "base"
+ enabledBorders: "NoBorder"
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: frameHover
+ anchors.fill: frame
+ imagePath: "widgets/lineedit"
+ prefix: "hover"
+ opacity: (mouseArea.containsMouse && !(wrapper.isCurrent && wrapper.activeFocus)) ? 1 : 0
+ Behavior on opacity {
+ NumberAnimation { duration: 100 }
+ }
+ }
+
+ Face {
+ id: face
+ anchors.bottom: loginText.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottomMargin: padding * 1.5
+ sourceSize.width: userFaceSize
+ sourceSize.height: userFaceSize
+ source: "image://face/" + name
+ }
+
+ Text {
+ id: loginText
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: display
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: {
+ wrapper.ListView.view.currentIndex = index;
+ wrapper.ListView.view.forceActiveFocus();
+ }
+ }
+ }
+ }
+
+ function startLogin() {
+ var username = usersList.currentItem.username;
+ if (username == guestLogin) {
+ greeter.authenticateAsGuest();
+ } else {
+ greeter.authenticate(username);
+ }
+ }
+
+ function indexForUserName(name) {
+ var index;
+ for (index = 0; index < usersList.count; ++index) {
+ if (usersList.contentItem.children[index].username == name) {
+ return index;
+ }
+ }
+ return 0;
+ }
+
+ ListView {
+ id: usersList
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: loginButtonItem.top
+ bottomMargin: 24
+ }
+ width: parent.width
+ height: userItemHeight
+ currentIndex: indexForUserName(greeter.selectGuest ? guestLogin : greeter.selectUser)
+ model: usersModel
+
+ cacheBuffer: count * 80
+
+ delegate: userDelegate
+
+ orientation: ListView.Horizontal
+
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ preferredHighlightBegin: width / 2 - userItemWidth / 2
+ preferredHighlightEnd: width / 2 + userItemWidth / 2
+ }
+
+ FocusScope {
+ id: loginButtonItem
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.verticalCenter
+ }
+ height: 30
+
+ property bool isGuestLogin: usersList.currentItem.username == guestLogin
+
+ /*PlasmaComponents.*/TextField {
+ id: passwordInput
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 200
+ height: parent.height
+ focus: !loginButtonItem.isGuestLogin
+ opacity: loginButtonItem.isGuestLogin ? 0 : 1
+
+ echoMode: TextInput.Password
+ placeholderText: i18n("Password")
+ onAccepted: startLogin();
+
+ PlasmaComponents.ToolButton {
+ id: loginButton
+ anchors {
+ right: parent.right
+ rightMargin: y
+ verticalCenter: parent.verticalCenter
+ }
+ width: implicitWidth
+ height: width
+
+ iconSource: "go-jump-locationbar"
+ onClicked: startLogin();
+ }
+
+ Behavior on opacity {
+ NumberAnimation { duration: 100 }
+ }
+ }
+
+ PlasmaComponents.Button {
+ id: guestLoginButton
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: userFaceSize + 2 * padding
+ height: parent.height
+ focus: loginButtonItem.isGuestLogin
+ opacity: 1 - passwordInput.opacity
+
+ iconSource: loginButton.iconSource
+ text: i18n("Login")
+ onClicked: startLogin();
+
+ Behavior on opacity {
+ NumberAnimation { duration: 100 }
+ }
+ }
+ }
+
+ ListButton {
+ id: sessionButton
+ anchors {
+ top: loginButtonItem.bottom
+ topMargin: 24
+ bottom: powerBar.top
+ horizontalCenter: parent.horizontalCenter
+ }
+
+ model: sessionsModel
+ dataRole: "key"
+ currentIndex: {
+ index = indexForData(usersList.currentItem.usersession)
+ if (index >= 0) {
+ return index;
+ }
+ index = indexForData(greeter.defaultSession)
+ if (index >= 0) {
+ return index;
+ }
+ return 0;
+ }
+ }
+
+ // Bottom "Power" bar
+ PlasmaCore.FrameSvgItem {
+ id: powerBar
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ width: childrenRect.width + margins.left
+ height: childrenRect.height + margins.top * 2
+ imagePath: "translucent/widgets/panel-background"
+ prefix: "south-mini"
+
+ enabledBorders: "LeftBorder|TopBorder"
+
+ Row {
+ spacing: 5
+ x: parent.margins.left
+ y: parent.margins.top
+
+ /*PlasmaComponents.*/ToolButton {
+ id: suspendButton
+ text: i18n("Suspend")
+ iconSource: "system-suspend"
+ enabled: power.canSuspend;
+ onClicked: power.suspend();
+ }
+
+ /*PlasmaComponents.*/ToolButton {
+ id: hibernateButton
+ text: i18n("Hibernate")
+ iconSource: "system-suspend-hibernate"
+ enabled: power.canHibernate
+ onClicked: power.hibernate();
+ }
+
+ /*PlasmaComponents.*/ToolButton {
+ id: restartButton
+ text: i18n("Restart")
+ iconSource: "system-reboot"
+ enabled: power.canRestart
+ onClicked: power.restart();
+ }
+
+ /*PlasmaComponents.*/ToolButton {
+ id: shutdownButton
+ text: i18n("Shutdown")
+ iconSource: "system-shutdown"
+ enabled: power.canShutdown
+ onClicked: power.shutdown();
+ }
+ }
+ }
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/main.xml b/ezgo-artwork/lightdm-kde-greeter/main.xml
new file mode 100644
index 0000000..7104f4d
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/main.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+ <kcfgfile name=""/>
+
+ <group name="greeter-settings">
+ <entry name="Background" type="String">
+ <default>/usr/share/ezgo/wallpaper/blue_1440_blur.png</default>
+ </entry>
+ </group>
+</kcfg>
diff --git a/ezgo-artwork/lightdm-kde-greeter/preview.png b/ezgo-artwork/lightdm-kde-greeter/preview.png
new file mode 100644
index 0000000..8efd63f
Binary files /dev/null and b/ezgo-artwork/lightdm-kde-greeter/preview.png differ
diff --git a/ezgo-artwork/lightdm-kde-greeter/private/ButtonShadow.qml b/ezgo-artwork/lightdm-kde-greeter/private/ButtonShadow.qml
new file mode 100644
index 0000000..8c00c35
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/private/ButtonShadow.qml
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp at gmail.com>
+ * Copyright (C) 2011 by Marco Martin <mart at kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/**Documented API
+Inherits:
+ Item
+
+Imports:
+ QtQuick 1.0
+ org.kde.plasma.core
+
+Description:
+TODO i need more info here
+
+
+Properties:
+**/
+
+import QtQuick 1.0
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+Item {
+ id: main
+ state: parent.state
+ //used to tell apart this implementation with the touch components one
+ property bool hasOverState: true
+
+ PlasmaCore.FrameSvgItem {
+ id: hover
+
+ anchors {
+ fill: parent
+ leftMargin: -margins.left
+ topMargin: -margins.top
+ rightMargin: -margins.right
+ bottomMargin: -margins.bottom
+ }
+ opacity: 0
+ imagePath: "widgets/button"
+ prefix: "hover"
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: shadow
+
+ anchors {
+ fill: parent
+ leftMargin: -margins.left
+ topMargin: -margins.top
+ rightMargin: -margins.right
+ bottomMargin: -margins.bottom
+ }
+ imagePath: "widgets/button"
+ prefix: "shadow"
+ }
+
+ states: [
+ State {
+ name: "shadow"
+ PropertyChanges {
+ target: shadow
+ opacity: 1
+ }
+ PropertyChanges {
+ target: hover
+ opacity: 0
+ prefix: "hover"
+ }
+ },
+ State {
+ name: "hover"
+ PropertyChanges {
+ target: shadow
+ opacity: 0
+ }
+ PropertyChanges {
+ target: hover
+ opacity: 1
+ prefix: "hover"
+ }
+ },
+ State {
+ name: "focus"
+ PropertyChanges {
+ target: shadow
+ opacity: 0
+ }
+ PropertyChanges {
+ target: hover
+ opacity: 1
+ prefix: "focus"
+ }
+ },
+ State {
+ name: "hidden"
+ PropertyChanges {
+ target: shadow
+ opacity: 0
+ }
+ PropertyChanges {
+ target: hover
+ opacity: 0
+ prefix: "hover"
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ PropertyAnimation {
+ properties: "opacity"
+ duration: 250
+ easing.type: Easing.OutQuad
+ }
+ }
+ ]
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/private/IconLoader.qml b/ezgo-artwork/lightdm-kde-greeter/private/IconLoader.qml
new file mode 100644
index 0000000..422a384
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/private/IconLoader.qml
@@ -0,0 +1,140 @@
+/*
+* Copyright (C) 2011 by Marco MArtin <mart at kde.org>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Library General Public License as
+* published by the Free Software Foundation; either version 2, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Library General Public License for more details
+*
+* You should have received a copy of the GNU Library General Public
+* License along with this program; if not, write to the
+* Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/**Documented API
+Inherits:
+ Item
+
+Imports:
+ QtQuick 1.1
+ org.kde.plasma.core
+ org.kde.qtextracomponents
+
+Description:
+ TODO i need more info here
+
+Properties:
+ bool valid:
+ Returns if the icon is valid or not.
+
+ string source:
+ Returns the dir,in which the icon exists.
+**/
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.qtextracomponents 0.1
+
+Item {
+ id: root
+
+ property bool valid: false
+
+ property variant source
+
+ onSourceChanged: {
+ //is it a qicon?
+ if (typeof source != "string") {
+ imageLoader.sourceComponent = iconComponent
+ valid = true
+ return
+ } else if (source == "") {
+ imageLoader.sourceComponent = null
+ valid = false
+ return
+ }
+
+ svgIcon.imagePath = "toolbar-icons/"+root.source.split("-")[0]
+ if (!svgIcon.isValid() || !svgIcon.hasElement(root.source)) {
+ svgIcon.imagePath = "icons/"+root.source.split("-")[0]
+ }
+
+ if (svgIcon.isValid() && svgIcon.hasElement(root.source)) {
+ imageLoader.sourceComponent = svgComponent
+ } else if ((root.source.indexOf(".") == -1 && root.source.indexOf(":") == -1)) {
+ imageLoader.sourceComponent = iconComponent
+ } else {
+ imageLoader.sourceComponent = imageComponent
+ }
+ valid = true
+ }
+
+ implicitWidth: theme.smallIconSize
+ implicitHeight: theme.smallIconSize
+
+ PlasmaCore.Svg {
+ id: svgIcon
+ }
+
+ function roundToStandardSize(size)
+ {
+ if (size >= theme.enormousIconSize) {
+ return theme.enormousIconSize
+ } else if (size >= theme.hugeIconSize) {
+ return theme.hugeIconSize
+ } else if (size >= theme.largeIconSize) {
+ return theme.largeIconSize
+ } else if (size >= theme.mediumIconSize) {
+ return theme.mediumIconSize
+ } else if (size >= theme.smallMediumIconSize) {
+ return theme.smallMediumIconSize
+ } else {
+ return theme.smallIconSize
+ }
+ }
+
+ Loader {
+ id: imageLoader
+ anchors.fill: parent
+
+ Component {
+ id: svgComponent
+
+ PlasmaCore.SvgItem {
+ svg: svgIcon
+ elementId: root.source
+ anchors.fill: parent
+ smooth: true
+ }
+ }
+
+ Component {
+ id: iconComponent
+
+ QIconItem {
+ icon: (typeof source == "string") ? QIcon(root.source) : root.source
+ smooth: true
+ anchors.fill: parent
+ }
+ }
+
+ Component {
+ id: imageComponent
+
+ Image {
+ source: root.source
+ sourceSize.width: width
+ sourceSize.height: height
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ anchors.fill: parent
+ }
+ }
+ }
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/private/TextFieldFocus.qml b/ezgo-artwork/lightdm-kde-greeter/private/TextFieldFocus.qml
new file mode 100644
index 0000000..3bc24ff
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/private/TextFieldFocus.qml
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp at gmail.com>
+ * Copyright (C) 2011 by Marco Martin <mart at kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 1.0
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+Item {
+ id: main
+ state: parent.state
+
+ PlasmaCore.Svg {
+ id: lineEditSvg
+ imagePath: "widgets/lineedit"
+ onRepaintNeeded: {
+ if (lineEditSvg.hasElement("hint-focus-over-base")) {
+ main.z = 800
+ } else {
+ main.z = 0
+ }
+ }
+ Component.onCompleted: {
+ if (lineEditSvg.hasElement("hint-focus-over-base")) {
+ main.z = 800
+ } else {
+ main.z = 0
+ }
+ }
+ }
+
+ PlasmaCore.FrameSvgItem {
+ id: hover
+
+ anchors {
+ fill: parent
+ leftMargin: -margins.left
+ topMargin: -margins.top
+ rightMargin: -margins.right
+ bottomMargin: -margins.bottom
+ }
+ opacity: 0
+ imagePath: "widgets/lineedit"
+ prefix: "hover"
+ }
+
+ states: [
+ State {
+ name: "hover"
+ PropertyChanges {
+ target: hover
+ opacity: 1
+ prefix: "hover"
+ }
+ },
+ State {
+ name: "focus"
+ PropertyChanges {
+ target: hover
+ opacity: 1
+ prefix: "focus"
+ }
+ },
+ State {
+ name: "hidden"
+ PropertyChanges {
+ target: hover
+ opacity: 0
+ prefix: "hover"
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ PropertyAnimation {
+ properties: "opacity"
+ duration: 250
+ easing.type: Easing.OutQuad
+ }
+ }
+ ]
+}
diff --git a/ezgo-artwork/lightdm-kde-greeter/theme.rc b/ezgo-artwork/lightdm-kde-greeter/theme.rc
new file mode 100644
index 0000000..3ffa767
--- /dev/null
+++ b/ezgo-artwork/lightdm-kde-greeter/theme.rc
@@ -0,0 +1,6 @@
+[theme]
+Name = ezgo11
+Description = Lightdm theme for ezgo 11. This theme is modified from lightdm-kde-greeter User Bar theme.
+Version = 11.0
+Author = Jiang Bing Run
+Homepage = http://ezgo.westart.tw
--
Blend for educatipn with asian specific adaptations
More information about the Blends-commit
mailing list