diff options
author | Christiaan Janssen <christiaan.janssen@digia.com> | 2012-10-31 17:16:08 +0100 |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@digia.com> | 2012-12-14 14:25:30 +0100 |
commit | d1e949a040e7074da8f98fe9fa6f501dc712d522 (patch) | |
tree | 3b414cac2cbd3b24fd6682735a9d041d289f3f42 /src | |
parent | da25e26145d1a102f7e2b401fcedc273ef91ddec (diff) | |
download | qt-creator-d1e949a040e7074da8f98fe9fa6f501dc712d522.tar.gz |
QmlProfiler: adjust popup drag limits on scroll
Change-Id: I16624fc04a860fb18d0ab6aeb41fb76ee27f360b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmlprofiler/qml/RangeDetails.qml | 17 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml | 17 |
2 files changed, 20 insertions, 14 deletions
diff --git a/src/plugins/qmlprofiler/qml/RangeDetails.qml b/src/plugins/qmlprofiler/qml/RangeDetails.qml index 5c8117cdbd..55c3e35505 100644 --- a/src/plugins/qmlprofiler/qml/RangeDetails.qml +++ b/src/plugins/qmlprofiler/qml/RangeDetails.qml @@ -51,7 +51,10 @@ Item { y: 25 property int yoffset: root.scrollY - onYoffsetChanged: y = relativey + yoffset + onYoffsetChanged: { + y = relativey + yoffset + fitInView(); + } property int relativey : y - yoffset onYChanged: relativey = y - yoffset @@ -71,10 +74,10 @@ Item { x = root.width - width; if (x < 0) x = 0; - if (y + height > root.candidateHeight) - y = root.candidateHeight - height; - if (y < 0) - y = 0; + if (y - yoffset + height > root.candidateHeight) + y = root.candidateHeight - height + yoffset; + if (y < yoffset) + y = yoffset; } // shadow @@ -187,8 +190,8 @@ Item { drag.target: parent drag.minimumX: 0 drag.maximumX: root.width - parent.width - drag.minimumY: 0 - drag.maximumY: root.candidateHeight - parent.height + drag.minimumY: yoffset + drag.maximumY: root.candidateHeight - parent.height + yoffset onClicked: { root.gotoSourceLocation(file, line, column); root.recenterOnItem(view.selectedItem); diff --git a/src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml b/src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml index 29bce7bc05..0081962481 100644 --- a/src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml +++ b/src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml @@ -46,7 +46,10 @@ Item { y: 125 property int yoffset: root.scrollY - onYoffsetChanged: y = relativey + yoffset + onYoffsetChanged: { + y = relativey + yoffset + fitInView(); + } property int relativey : y - yoffset onYChanged: relativey = y - yoffset @@ -66,10 +69,10 @@ Item { x = root.width - width; if (x < 0) x = 0; - if (y + height > root.candidateHeight) - y = root.candidateHeight - height; - if (y < 0) - y = 0; + if (y + height - yoffset > root.candidateHeight) + y = root.candidateHeight - height + yoffset; + if (y < yoffset) + y = yoffset; } // shadow @@ -158,8 +161,8 @@ Item { drag.target: parent drag.minimumX: 0 drag.maximumX: root.width - parent.width - drag.minimumY: 0 - drag.maximumY: root.candidateHeight - parent.height + drag.minimumY: yoffset + drag.maximumY: root.candidateHeight - parent.height + yoffset onClicked: { if ((selectionRange.x < flick.contentX) ^ (selectionRange.x+selectionRange.width > flick.contentX + flick.width)) { root.recenter(selectionRange.startTime + selectionRange.duration/2); |