mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-17 15:04:18 +03:00
Round percentage width to nearest pixel with integers.
svn path=/trunk/netsurf/; revision=3901
This commit is contained in:
parent
9c0eda1d2c
commit
201dabcb9b
@ -738,8 +738,9 @@ void layout_find_dimensions(int available_width,
|
||||
style);
|
||||
break;
|
||||
case CSS_WIDTH_PERCENT:
|
||||
*width = 0.5 + (available_width *
|
||||
style->width.value.percent / 100.0);
|
||||
/* Round to nearest pixel */
|
||||
*width = (style->width.value.percent *
|
||||
available_width + 50) / 100;
|
||||
/* gadget widths include margins,
|
||||
* borders and padding */
|
||||
if (box->gadget) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user