QmlProfiler: Avoid drawing outside of widget

Avoid rendering outside of the canvas by forcing the windows
size onto the scene, and also removing the related candidateSize
logic.

In the QtQUick1 based profiler one could scroll the canvas also
vertically, but that doesn't work any more. This is a hot fix
to work around the problem, we can hopefully bring back the
full solution later ...

Change-Id: Ibd3d54f6b98c3764e104116d395a77b880d88bcb
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Kai Koehne
2013-10-30 13:49:01 +01:00
parent 33ac7e4445
commit 0599cb7366
5 changed files with 17 additions and 21 deletions

View File

@@ -35,9 +35,7 @@ Rectangle {
// ***** properties
property int candidateHeight: 0
property int scrollY: 0
height: Math.max( candidateHeight, labels.height + 2 )
property int singleRowHeight: 30
@@ -464,9 +462,9 @@ Rectangle {
root.updateVerticalScroll(itemY);
} else
if (itemY + root.singleRowHeight >
root.scrollY + root.candidateHeight) {
root.scrollY + root.height) {
root.updateVerticalScroll(itemY + root.singleRowHeight -
root.candidateHeight);
root.height);
}
} else {
@@ -584,7 +582,7 @@ Rectangle {
}
Rectangle {
y: root.scrollY + root.candidateHeight - height
y: root.scrollY + root.height - height
height: 6
width: root.width
x: 0