Commit d1e949a0 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlProfiler: adjust popup drag limits on scroll



Change-Id: I16624fc04a860fb18d0ab6aeb41fb76ee27f360b
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent da25e261
...@@ -51,7 +51,10 @@ Item { ...@@ -51,7 +51,10 @@ Item {
y: 25 y: 25
property int yoffset: root.scrollY property int yoffset: root.scrollY
onYoffsetChanged: y = relativey + yoffset onYoffsetChanged: {
y = relativey + yoffset
fitInView();
}
property int relativey : y - yoffset property int relativey : y - yoffset
onYChanged: relativey = y - yoffset onYChanged: relativey = y - yoffset
...@@ -71,10 +74,10 @@ Item { ...@@ -71,10 +74,10 @@ Item {
x = root.width - width; x = root.width - width;
if (x < 0) if (x < 0)
x = 0; x = 0;
if (y + height > root.candidateHeight) if (y - yoffset + height > root.candidateHeight)
y = root.candidateHeight - height; y = root.candidateHeight - height + yoffset;
if (y < 0) if (y < yoffset)
y = 0; y = yoffset;
} }
// shadow // shadow
...@@ -187,8 +190,8 @@ Item { ...@@ -187,8 +190,8 @@ Item {
drag.target: parent drag.target: parent
drag.minimumX: 0 drag.minimumX: 0
drag.maximumX: root.width - parent.width drag.maximumX: root.width - parent.width
drag.minimumY: 0 drag.minimumY: yoffset
drag.maximumY: root.candidateHeight - parent.height drag.maximumY: root.candidateHeight - parent.height + yoffset
onClicked: { onClicked: {
root.gotoSourceLocation(file, line, column); root.gotoSourceLocation(file, line, column);
root.recenterOnItem(view.selectedItem); root.recenterOnItem(view.selectedItem);
......
...@@ -46,7 +46,10 @@ Item { ...@@ -46,7 +46,10 @@ Item {
y: 125 y: 125
property int yoffset: root.scrollY property int yoffset: root.scrollY
onYoffsetChanged: y = relativey + yoffset onYoffsetChanged: {
y = relativey + yoffset
fitInView();
}
property int relativey : y - yoffset property int relativey : y - yoffset
onYChanged: relativey = y - yoffset onYChanged: relativey = y - yoffset
...@@ -66,10 +69,10 @@ Item { ...@@ -66,10 +69,10 @@ Item {
x = root.width - width; x = root.width - width;
if (x < 0) if (x < 0)
x = 0; x = 0;
if (y + height > root.candidateHeight) if (y + height - yoffset > root.candidateHeight)
y = root.candidateHeight - height; y = root.candidateHeight - height + yoffset;
if (y < 0) if (y < yoffset)
y = 0; y = yoffset;
} }
// shadow // shadow
...@@ -158,8 +161,8 @@ Item { ...@@ -158,8 +161,8 @@ Item {
drag.target: parent drag.target: parent
drag.minimumX: 0 drag.minimumX: 0
drag.maximumX: root.width - parent.width drag.maximumX: root.width - parent.width
drag.minimumY: 0 drag.minimumY: yoffset
drag.maximumY: root.candidateHeight - parent.height drag.maximumY: root.candidateHeight - parent.height + yoffset
onClicked: { onClicked: {
if ((selectionRange.x < flick.contentX) ^ (selectionRange.x+selectionRange.width > flick.contentX + flick.width)) { if ((selectionRange.x < flick.contentX) ^ (selectionRange.x+selectionRange.width > flick.contentX + flick.width)) {
root.recenter(selectionRange.startTime + selectionRange.duration/2); root.recenter(selectionRange.startTime + selectionRange.duration/2);
......
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