Currently if a Rectangle has an odd-numbered width, part of the bottom and right-hand borders are rendered outside the rectangle's boundaries, not inside. This is consistent with Qt's border rendering, as documented at http://doc.qt.nokia.com/4.7-snapshot/qrectf.html (under "Rendering").
This behaviour means that if a Rectangle is drawn inside another Rectangle that
has clipping enabled, the inner Rectangle's borders are clipped on the bottom
and right-hand sides. If the border width is 1, you will only see the top and
left borders of the inner Rectangle.
This can be easily fixed with the attached patch, but obviously it would change
the appearance of existing apps. For example if a ListView delegate renders
bordered Rectangle elements for each item like this:
Rectangle {
width: 100; height: 200
ListModel {
id: model
ListElement {}
ListElement {}
ListElement {}
}
ListView {
anchors.fill: parent
model: model
delegate: Rectangle {
width: 100; height: 50
color: "lightsteelblue"
border.width: 1
}
}
}
Currently, there would be a one-pixel horizontal black line between each
element, because the bottom border of each element is not visible - i.e. the
visible line comes from the top border of the element below (see
unpatched.png). If the patch is applied, the bottom borders would be visible,
and the horizontal black lines between elements would be two pixels high
instead (patched.png). Note that you can still revert to the one-pixel gap by
setting "spacing: -1" on the view.
Can this patch be applied? Does anyone foresee significant issues arising from
this patch?
Bea
<<attachment: patched.png>>
<<attachment: unpatched.png>>
patch.diff
Description: patch.diff
_______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
