forked from qt-creator/qt-creator
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 b3348daefd .
Change-Id: Ife0064c4226ecff0e99d3d6aaf7a104b3c46e751
Task-number: QTCREATORBUG-12822
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user