From 7b6efde141a233cb9c8de9a3a4ee5ddb3a2cefa5 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 11 Aug 2014 16:43:16 +0200 Subject: [PATCH] QmlProfiler: Use correct width for scaling timeline ranges The width of the flickable element may be different from the width of the timeline renderer because the flickable can have a scrollbar. This is the same principle as in b3348daefdd309637e1e9a5ac489c49533463123 . Change-Id: Ife0064c4226ecff0e99d3d6aaf7a104b3c46e751 Task-number: QTCREATORBUG-12822 Reviewed-by: Alex Blasche --- src/plugins/qmlprofiler/qml/SelectionRange.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/qml/SelectionRange.qml b/src/plugins/qmlprofiler/qml/SelectionRange.qml index c8b55fa892..c1bab1f673 100644 --- a/src/plugins/qmlprofiler/qml/SelectionRange.qml +++ b/src/plugins/qmlprofiler/qml/SelectionRange.qml @@ -48,7 +48,7 @@ RangeMover { target: zoomControl onRangeChanged: { var oldTimePerPixel = selectionRange.viewTimePerPixel; - selectionRange.viewTimePerPixel = Math.abs(zoomControl.endTime() - zoomControl.startTime()) / flick.width; + selectionRange.viewTimePerPixel = Math.abs(zoomControl.endTime() - zoomControl.startTime()) / view.intWidth; if (creationState === 3 && oldTimePerPixel != selectionRange.viewTimePerPixel) { var newWidth = getWidth() * oldTimePerPixel / viewTimePerPixel; setLeft(getLeft() * oldTimePerPixel / viewTimePerPixel); -- GitLab