forked from qt-creator/qt-creator
QmlProfiler: adjust popup drag limits on scroll
Change-Id: I16624fc04a860fb18d0ab6aeb41fb76ee27f360b Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user