From df7912f96b2cc4df284472976a9ac3e755379bfb Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 7 Nov 2006 21:49:03 +0000 Subject: Fix distortion of list marker images. svn path=/trunk/netsurf/; revision=3039 --- render/layout.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/render/layout.c b/render/layout.c index af1904a66..d618af2f7 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2394,12 +2394,22 @@ void layout_lists(struct box *box) for (child = box->children; child; child = child->next) { if (child->list_marker) { marker = child->list_marker; - if (marker->width == UNKNOWN_WIDTH) - nsfont_width(marker->style, marker->text, - marker->length, &marker->width); - marker->x = -marker->width; - marker->y = 0; - marker->height = line_height(marker->style); + if (marker->object) { + marker->width = marker->object->width; + marker->x = -marker->width; + marker->height = marker->object->height; + marker->y = (line_height(marker->style) - + marker->height) / 2; + } else { + if (marker->width == UNKNOWN_WIDTH) + nsfont_width(marker->style, + marker->text, + marker->length, + &marker->width); + marker->x = -marker->width; + marker->y = 0; + marker->height = line_height(marker->style); + } } layout_lists(child); } -- cgit v1.2.3