summaryrefslogtreecommitdiff
path: root/testsuite/reftests/center-center-200x200-picture-in-200x100.ui
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2021-10-22 14:51:56 +0200
committerBenjamin Otte <otte@redhat.com>2021-10-22 17:51:40 +0200
commit1606a411162c87a2de4bfdf686bd2b6e972b36e2 (patch)
treed22eed67833fd381b81d7e17834cc3dc5bef47c0 /testsuite/reftests/center-center-200x200-picture-in-200x100.ui
parent438bf8596e9a5c8bda10f5378fd2a44ee89e7386 (diff)
downloadgtk+-1606a411162c87a2de4bfdf686bd2b6e972b36e2.tar.gz
widget: adjust allocation even better
This fixes fallout from 3742fabae040d914e6ae58edf31170a54a980f21 where we would no longer allocate widgets to their natural size when align flags where used. GtkPicture wants to be allocated at 100% in that case, so a picture with a 100x100 image inside a 200x200 window should be allocated 100x100. The new adjustment code now does the following (for width-for-height instead of height-for-width, swap width and height in the following): 1. query the minimum width for the allocated height 2. query the natural width 3. compute the maximum of (1) and (2) 4. set the widget width to the minimum of (3) and the allocated width. 5. compute the natural height for (4) 6. set the widget height to the minimum of (5) and the allocated height.
Diffstat (limited to 'testsuite/reftests/center-center-200x200-picture-in-200x100.ui')
0 files changed, 0 insertions, 0 deletions