From ceb5f5ff7f9421f2a670768c4cde8fe0b4694aa2 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 6 Mar 2008 19:41:49 +0000 Subject: Round percentage widths to nearest pixel instead of down. svn path=/trunk/netsurf/; revision=3891 --- render/layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 6b835d526..f5dca7c89 100644 --- a/render/layout.c +++ b/render/layout.c @@ -738,8 +738,8 @@ void layout_find_dimensions(int available_width, style); break; case CSS_WIDTH_PERCENT: - *width = available_width * - style->width.value.percent / 100; + *width = 0.5 + (available_width * + style->width.value.percent / 100.0); /* gadget widths include margins, * borders and padding */ if (box->gadget) { -- cgit v1.2.3