From 07b1f67ec5622cc417f940de8264fb349d0d38cc Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 8 May 2013 19:39:36 +0200 Subject: [PATCH] svg for controller background --- .../configuration/PanelConfiguration.qml | 74 ++++++++++++++----- .../panelconfiguration/Ruler.qml | 7 +- 2 files changed, 61 insertions(+), 20 deletions(-) diff --git a/src/shell/qmlpackages/desktop/contents/configuration/PanelConfiguration.qml b/src/shell/qmlpackages/desktop/contents/configuration/PanelConfiguration.qml index f163e7e81..32afb0527 100644 --- a/src/shell/qmlpackages/desktop/contents/configuration/PanelConfiguration.qml +++ b/src/shell/qmlpackages/desktop/contents/configuration/PanelConfiguration.qml @@ -26,11 +26,30 @@ import "panelconfiguration" //TODO: all of this will be done with desktop components -Rectangle { +PlasmaCore.FrameSvgItem { id: root + imagePath: "dialogs/background" + + state: { + switch (panel.location) { + //TopEdge + case 3: + return "TopEdge" + //LeftEdge + case 5: + return "LeftEdge" + //RightEdge + case 6: + return "RightEdge" + //BottomEdge + case 4: + default: + return "BottomEdge" + } + } + //BEGIN properties - color: "lightgray" width: 640 height: 64 //END properties @@ -49,23 +68,7 @@ Rectangle { Ruler { id: ruler - state: { - switch (panel.location) { - //TopEdge - case 3: - return "TopEdge" - //LeftEdge - case 5: - return "LeftEdge" - //RightEdge - case 6: - return "RightEdge" - //BottomEdge - case 4: - default: - return "BottomEdge" - } - } + state: root.state } Row { @@ -249,4 +252,37 @@ Rectangle { } } //END UI components + +//BEGIN States +states: [ + State { + name: "TopEdge" + PropertyChanges { + target: root + enabledBorders: "TopBorder|BottomBorder" + } + }, + State { + name: "BottomEdge" + PropertyChanges { + target: root + enabledBorders: "TopBorder|BottomBorder" + } + }, + State { + name: "LeftEdge" + PropertyChanges { + target: root + enabledBorders: "LeftBorder|RightBorder" + } + }, + State { + name: "RightEdge" + PropertyChanges { + target: root + enabledBorders: "LeftBorder|RightBorder" + } + } + ] +//END States } diff --git a/src/shell/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml b/src/shell/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml index e7cf57d7d..51db05202 100644 --- a/src/shell/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml +++ b/src/shell/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml @@ -26,6 +26,11 @@ import org.kde.qtextracomponents 2.0 as QtExtras PlasmaCore.FrameSvgItem { id: root + + property alias offset: offsetHandle.value + property alias minimumLength: minimumLengthHandle.value + property alias maximumLength: maximumLengthHandle.value + imagePath: "widgets/containment-controls" state: "BottomEdge" implicitWidth: offsetButton.implicitwidth + minimumLengthHandle.implicitwidth @@ -35,7 +40,7 @@ PlasmaCore.FrameSvgItem { imagePath: "widgets/containment-controls" } OffsetHandle { - id: offsetButton + id: offsetHandle } MinimumLengthHandle { id: minimumLengthHandle