Age | Commit message (Collapse) | Author |
|
Images should preserve their own aspect ratio, which is determined by
the image buffer size, also known as the intrinsic size. Currently, when
a child requests a requisition to be corrected by correctRequisition(),
only the size was adjusted, ignoring the aspect ratio.
The new Widget ratio variable holds the desired aspect ratio for the
widget, and will only be taken into account when non-zero. In that case,
then correcting the requisition, a naive algorithm tries to first
increase the length of the small size to fill the preferred aspect
ratio. In the case that it is not enough, the larger size is then
decreased to fit the aspect ratio. And if that doesn't work either, the
aspect ratio is not enforced and the widget will be distorted.
There are special cases for correctRequisition() depending if the parent
exists or not. The same approach is taken for both cases, but using the
viewport size instead of the parent size.
|
|
When a widget calls the parent to correct its own requisition, let the
child widget perform adjustments on the requisition. This allows images
to control the height when the parent changes the width, so the image
can preserve its own aspect ratio.
|
|
handling conflicts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call sizeRequest.
|
|
|
|
at once.
|
|
dw::core::ImgRenderer, not dw::Image (which now implements the former) anymore.
|
|
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2010-March/007406.html
Johannes wrote the code, and I (corvid) added some big comments of the sort
alluded to in that thread.
|
|
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2010-March/007393.html
(Johannes has already fixed the Rectangle clipping problem. Why the polygons
aren't shown initially isn't known yet.)
|
|
|
|
|
|
|
|
|