SizeRequest: Round px values up for min CSS sizes
authorDaniel Boles <dboles.src@gmail.com>
Mon, 21 May 2018 20:45:27 +0000 (21:45 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Tue, 5 Jun 2018 17:49:52 +0000 (18:49 +0100)
commit3396c5e983289682965c2f1f0d75a1aba04cb088
treea840fe6c329b8e65b3ff30a61ca32d834e223e24
parent5c24bbf00c1208a7550c723d46ef501dd644959a
SizeRequest: Round px values up for min CSS sizes

Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the widget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise. My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088
gtk/gtksizerequest.c