use plasma components

This commit is contained in:
Marco Martin 2013-09-06 13:43:08 +02:00
parent dac6f34963
commit cbd77b64e1

View File

@ -17,6 +17,7 @@
*/ */
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
@ -46,10 +47,11 @@ Rectangle {
when: plasmoid.expanded when: plasmoid.expanded
source: Component { source: Component {
Item { Item {
Column { ColumnLayout {
id: column id: column
anchors.centerIn: parent anchors.centerIn: parent
Text { PlasmaComponents.Label {
anchors.horizontalCenter: parent.horizontalCenter
text: i18n("I'm an applet") text: i18n("I'm an applet")
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -67,15 +69,15 @@ Rectangle {
} }
} }
PlasmaComponents.Button { PlasmaComponents.Button {
id: busyButton
text: i18n("Busy") text: i18n("Busy")
checked: plasmoid.busy checked: plasmoid.busy
onClicked: { onClicked: {
plasmoid.busy = !plasmoid.busy plasmoid.busy = !plasmoid.busy
} }
} }
TextInput { PlasmaComponents.TextField {
width: 100 implicitWidth: busyButton.width
height: 22
text: plasmoid.configuration.Test text: plasmoid.configuration.Test
onTextChanged: plasmoid.configuration.Test = text onTextChanged: plasmoid.configuration.Test = text
} }