[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace] plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration:
From: Marco Martin <notmart () gmail ! com>
Date: 2014-02-21 11:45:48
Message-ID: E1WGoY8-0002cu-Fv () scm ! kde ! org
[Download RAW message or body]
Git commit 4b4a5b814fddf04c60c77fbc9a91e891894f85e6 by Marco Martin.
Committed on 21/02/2014 at 11:43.
Pushed by mart into branch 'master'.
better control of boundaries for the ruler handles
M +4 -0 plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml
M +7 -0 plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/SliderHandle.qml
http://commits.kde.org/kde-workspace/4b4a5b814fddf04c60c77fbc9a91e891894f85e6
diff --git a/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml \
b/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml index \
920aa7a..b94b0b2 100644
--- a/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml
+++ b/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/Ruler.qml
@@ -73,6 +73,7 @@ PlasmaCore.FrameSvgItem {
offset: panel.offset
graphicElementName: "minslider"
onValueChanged: panel.minimumLength = value
+ minimumValue: (panel.alignment == Qt.AlignCenter) ? ((dialogRoot.vertical) ? root.height/2 : \
root.width/2) : ((dialogRoot.vertical) ? -height/2 : -width/2); }
SliderHandle {
id: maximumLengthHandle
@@ -81,6 +82,7 @@ PlasmaCore.FrameSvgItem {
offset: panel.offset
graphicElementName: "maxslider"
onValueChanged: panel.maximumLength = value
+ minimumValue: (panel.alignment == Qt.AlignCenter) ? ((dialogRoot.vertical) ? root.height/2 : \
root.width/2) : ((dialogRoot.vertical) ? -height/2 : -width/2); }
SliderHandle {
id: leftMinimumLengthHandle
@@ -89,6 +91,7 @@ PlasmaCore.FrameSvgItem {
offset: panel.offset
graphicElementName: "maxslider"
onValueChanged: panel.minimumLength = value
+ maximumValue: (panel.alignment == Qt.AlignCenter) ? ((dialogRoot.vertical) ? \
root.height/2-height : root.width/2-width) : ((dialogRoot.vertical) ? root.height-height/2 : \
root.width-width/2); }
SliderHandle {
id: leftMaximumLengthHandle
@@ -97,6 +100,7 @@ PlasmaCore.FrameSvgItem {
offset: panel.offset
graphicElementName: "minslider"
onValueChanged: panel.maximumLength = value
+ maximumValue: (panel.alignment == Qt.AlignCenter) ? ((dialogRoot.vertical) ? \
root.height/2-height : root.width/2-width) : ((dialogRoot.vertical) ? root.height-height/2 : \
root.width-width/2); }
states: [
diff --git a/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/SliderHandle.qml \
b/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/SliderHandle.qml index \
e13cb9d..69bf7b4 100644
--- a/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/SliderHandle.qml
+++ b/plasma/desktop/qmlpackages/desktop/contents/configuration/panelconfiguration/SliderHandle.qml
@@ -40,6 +40,9 @@ PlasmaCore.SvgItem {
//handle type: behave in different ways based on the alignment
property int alignment: panel.alignment
+ property int minimumValue: (dialogRoot.vertical) ? -root.height/2 : -root.width/2
+ property int maximumValue: (dialogRoot.vertical) ? root.parent.height : root.parent.width
+
function syncPos() {
if (dialogRoot.vertical) {
if (alignment == Qt.AlignRight) {
@@ -84,6 +87,10 @@ PlasmaCore.SvgItem {
drag {
target: parent
axis: (dialogRoot.vertical) ? Drag.YAxis : Drag.XAxis
+ minimumX: root.minimumValue
+ minimumY: root.minimumValue
+ maximumX: root.maximumValue
+ maximumY: root.maximumValue
}
anchors.fill: parent
onPositionChanged: {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic