use dialogRoot.vertical
This commit is contained in:
parent
8d4ddfe2a5
commit
13c5cf9380
@ -41,7 +41,7 @@ PlasmaCore.SvgItem {
|
|||||||
property int alignment: panel.alignment
|
property int alignment: panel.alignment
|
||||||
|
|
||||||
function syncPos() {
|
function syncPos() {
|
||||||
if (panel.location == 5 || panel.location == 6) {
|
if (dialogRoot.vertical) {
|
||||||
if (alignment == Qt.AlignRight) {
|
if (alignment == Qt.AlignRight) {
|
||||||
y = root.parent.height - (value + offset + root.height/2)
|
y = root.parent.height - (value + offset + root.height/2)
|
||||||
} else if (alignment == Qt.AlignLeft) {
|
} else if (alignment == Qt.AlignLeft) {
|
||||||
@ -83,11 +83,11 @@ PlasmaCore.SvgItem {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
drag {
|
drag {
|
||||||
target: parent
|
target: parent
|
||||||
axis: (panel.location == 5 || panel.location == 6) ? Drag.YAxis : Drag.XAxis
|
axis: (dialogRoot.vertical) ? Drag.YAxis : Drag.XAxis
|
||||||
}
|
}
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
if (panel.location == 5 || panel.location == 6) {
|
if (dialogRoot.vertical) {
|
||||||
if (root.alignment == Qt.AlignRight) {
|
if (root.alignment == Qt.AlignRight) {
|
||||||
root.value = root.parent.height - (parent.y + offset + root.height/2)
|
root.value = root.parent.height - (parent.y + offset + root.height/2)
|
||||||
} else if (alignment == Qt.AlignLeft) {
|
} else if (alignment == Qt.AlignLeft) {
|
||||||
|
Loading…
Reference in New Issue
Block a user