summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2006-11-07 21:49:03 +0000
committerJames Bursa <james@netsurf-browser.org>2006-11-07 21:49:03 +0000
commitdf7912f96b2cc4df284472976a9ac3e755379bfb (patch)
treeff435f9da21cb25c2e862ef817c6dc77d912d14d /render
parent6d6ab5399c576ba919d1d1e26712a7ebd0e0616c (diff)
downloadnetsurf-df7912f96b2cc4df284472976a9ac3e755379bfb.tar.gz
netsurf-df7912f96b2cc4df284472976a9ac3e755379bfb.tar.bz2
Fix distortion of list marker images.
svn path=/trunk/netsurf/; revision=3039
Diffstat (limited to 'render')
-rw-r--r--render/layout.c22
1 files 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);
}