summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-03-06 19:41:49 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-03-06 19:41:49 +0000
commitceb5f5ff7f9421f2a670768c4cde8fe0b4694aa2 (patch)
tree6216a2bdca39400f682df0368acddb4459d7a5b5
parentfed99c2cb5fbc69cf74b0bf0f60210a9ca6fab8c (diff)
downloadnetsurf-ceb5f5ff7f9421f2a670768c4cde8fe0b4694aa2.tar.gz
netsurf-ceb5f5ff7f9421f2a670768c4cde8fe0b4694aa2.tar.bz2
Round percentage widths to nearest pixel instead of down.
svn path=/trunk/netsurf/; revision=3891
-rw-r--r--render/layout.c4
1 files changed, 2 insertions, 2 deletions
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) {