Commit 3d825bbc authored by Marco Martin's avatar Marco Martin

panel at left like the widget explorer

parent 813bd8fa
...@@ -31,7 +31,7 @@ Rectangle { ...@@ -31,7 +31,7 @@ Rectangle {
Layout.minimumHeight: units.gridUnit * 20 Layout.minimumHeight: units.gridUnit * 20
//BEGIN properties //BEGIN properties
color: Qt.rgba(0, 0, 0, 1 - panel.x/width) color: Qt.rgba(0, 0, 0, (1 - Math.abs(panel.x / (panel.width/2))) * 0.8)
width: units.gridUnit * 40 width: units.gridUnit * 40
height: units.gridUnit * 30 height: units.gridUnit * 30
...@@ -118,7 +118,7 @@ Rectangle { ...@@ -118,7 +118,7 @@ Rectangle {
properties: "x" properties: "x"
duration: units.longDuration duration: units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
to: root.width/6 to: 0
} }
SequentialAnimation { SequentialAnimation {
id: closeAnim id: closeAnim
...@@ -127,7 +127,7 @@ Rectangle { ...@@ -127,7 +127,7 @@ Rectangle {
properties: "x" properties: "x"
duration: units.longDuration duration: units.longDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
to: root.width to: -panel.width
} }
ScriptAction { ScriptAction {
script: cancelAction.trigger(); script: cancelAction.trigger();
...@@ -164,24 +164,23 @@ Rectangle { ...@@ -164,24 +164,23 @@ Rectangle {
drag.filterChildren: true drag.filterChildren: true
drag.target: panel drag.target: panel
drag.axis: Drag.XAxis drag.axis: Drag.XAxis
drag.maximumX: width drag.maximumX: 0
drag.minimumX: width/6
onReleased: { onReleased: {
if (panel.x > root.width/2) { if (panel.x < -panel.width/3) {
closeAnim.running = true; closeAnim.running = true;
} else { } else {
openAnim.running = true; openAnim.running = true;
} }
} }
onClicked: { onClicked: {
if (mouse.x < width / 6) { if (mouse.x > main.width) {
closeAnim.running = true; closeAnim.running = true;
} }
} }
Rectangle { Rectangle {
id: panel id: panel
width: root.width - root.width/6 x: -width
x: root.width width: parent.width - parent.width/6
height: root.height height: root.height
color: syspal.window color: syspal.window
ColumnLayout { ColumnLayout {
...@@ -362,7 +361,7 @@ Rectangle { ...@@ -362,7 +361,7 @@ Rectangle {
LinearGradient { LinearGradient {
width: units.gridUnit/2 width: units.gridUnit/2
anchors { anchors {
right: parent.left left: parent.right
top: parent.top top: parent.top
bottom: parent.bottom bottom: parent.bottom
rightMargin: -1 rightMargin: -1
...@@ -372,20 +371,17 @@ Rectangle { ...@@ -372,20 +371,17 @@ Rectangle {
gradient: Gradient { gradient: Gradient {
GradientStop { GradientStop {
position: 0.0 position: 0.0
color: "transparent" color: Qt.rgba(0, 0, 0, 0.3)
} }
GradientStop { GradientStop {
position: 0.7 position: 0.3
color: Qt.rgba(0, 0, 0, 0.15) color: Qt.rgba(0, 0, 0, 0.15)
} }
GradientStop { GradientStop {
position: 1.0 position: 1.0
color: Qt.rgba(0, 0, 0, 0.3) color: "transparent"
} }
} }
MouseArea {
anchors.fill: parent
}
} }
} }
} }
......
...@@ -129,9 +129,6 @@ Rectangle { ...@@ -129,9 +129,6 @@ Rectangle {
color: "transparent" color: "transparent"
} }
} }
MouseArea {
anchors.fill: parent
}
} }
WidgetExplorer { WidgetExplorer {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment