In most of my QML apps I check the sizes of things and react. This goes out the window when you use a border that can grow outside of the Rectangle. I would rather they just grew inwards so that a 100x100 Rectangle really is that size. I cannot think of a single reason to support more than this.
- Nigel Hi, I agree with Kai, it would be much easier to understand the rendered result if the border just grew outwards or inwards. A suggestion (I don't know if it is feasible) is to have this configurable on each Rectangle. Something like this: border.alignment: "centered" (eventually default) border.alignment: "grow_inwards" border.alignment: "grow_outwards" Regards, Stefan From: <[email protected]<mailto:[email protected]>> To: <[email protected]<mailto:[email protected]>>, <[email protected]<mailto:[email protected]>> Date: 2010-05-06 11:07 Subject: Re: [Qt-qml] Rendering of rectangle borders with odd-numbered widths Sent by: [email protected]<mailto:[email protected]> ________________________________ Hi, [email protected]<mailto:[email protected]> wrote: > 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"). I'm still wondering what the reasoning behind this is ... Rendering the border both inside and outside the item boundaries seems to me to just combine the disadvantages of rendering it completely inside (item content is hidden) and outside (render area outside of area specified by x, y, with, height). Anyway, I guess it's not an option to change this in the foreseeable future. > 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: If I got the patch right it's just fixing the (arguably most common) case of a one pixel sized border ... Can't the ListView just use the delegates boundingRect() (which is AFAIK also including the border) for calculating the size of an item? Regards Kai -- Kai K?hne Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B Umsatzsteueridentifikationsnummer: DE 812 845 193 Gesch?ftsf?hrer: Dr. Michael Halbherr, Karim T?htivuori _______________________________________________ Qt-qml mailing list [email protected]<mailto:[email protected]> http://lists.trolltech.com/mailman/listinfo/qt-qml <ATT00001..txt>
_______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
