forked from qt-creator/qt-creator
QmlProfiler: Restrict greying of out-of-bounds timemarks to content.
Before the grey shadows appeared on white background if you "overflicked" at the beginning or start of the timeline. Change-Id: I53361b5eecfacbd48967ea7e0c564c3376a8b170 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -104,13 +104,13 @@ Canvas2D {
|
||||
if (startTime < qmlProfilerModelProxy.traceStartTime()) {
|
||||
ctxt.fillStyle = "rgba(127,127,127,0.2)";
|
||||
rectWidth = (qmlProfilerModelProxy.traceStartTime() - startTime) * spacing;
|
||||
ctxt.fillRect(0, 0, rectWidth, height);
|
||||
ctxt.fillRect(0, lineStart, rectWidth, lineEnd);
|
||||
}
|
||||
if (endTime > qmlProfilerModelProxy.traceEndTime()) {
|
||||
ctxt.fillStyle = "rgba(127,127,127,0.2)";
|
||||
var rectX = (qmlProfilerModelProxy.traceEndTime() - startTime) * spacing;
|
||||
rectWidth = (endTime - qmlProfilerModelProxy.traceEndTime()) * spacing;
|
||||
ctxt.fillRect(rectX, 0, rectWidth, height);
|
||||
ctxt.fillRect(rectX, lineStart, rectWidth, lineEnd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user