diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-12 21:13:55 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-12 21:13:55 +0000 |
commit | d1d3a65b06bab49d0658915772ef6d19ad8696d5 (patch) | |
tree | 9a000a9b02ec41ffd516b29c13a715cde7d1de42 /desktop | |
parent | eabf7e8afdc43c6c764b3f3d9435e1ded08bce80 (diff) | |
download | netsurf-d1d3a65b06bab49d0658915772ef6d19ad8696d5.tar.gz netsurf-d1d3a65b06bab49d0658915772ef6d19ad8696d5.tar.bz2 |
Set icon position with respect to TREE_LINE_HEIGHT.
svn path=/trunk/netsurf/; revision=11041
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/tree.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop/tree.c b/desktop/tree.c index 90a033b57..c19550a4f 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -1520,6 +1520,7 @@ static void tree_draw_node_element(struct tree *tree, bool selected = false; hlcache_handle *icon; plot_font_style_t *fstyle; + const int icon_inset = (TREE_LINE_HEIGHT - TREE_ICON_SIZE) / 2; assert(tree != NULL); assert(element != NULL); @@ -1535,15 +1536,14 @@ static void tree_draw_node_element(struct tree *tree, switch (element->type) { case NODE_ELEMENT_TEXT_PLUS_ICON: icon = element->bitmap; - if (icon != NULL && - (content_get_status(icon) == - CONTENT_STATUS_READY || - content_get_status(icon) == - CONTENT_STATUS_DONE)) { - content_redraw(icon , x, y + 2, - TREE_ICON_SIZE, TREE_ICON_SIZE, - x, y + 2, x + TREE_ICON_SIZE, - y + 2 + TREE_ICON_SIZE, 1, 0); + if (icon != NULL && (content_get_status(icon) == + CONTENT_STATUS_READY || + content_get_status(icon) == + CONTENT_STATUS_DONE)) { + content_redraw(icon , x, y + icon_inset, + TREE_ICON_SIZE, TREE_ICON_SIZE, + x, y + icon_inset, x + TREE_ICON_SIZE, + y + icon_inset + TREE_ICON_SIZE, 1, 0); } x += NODE_INSTEP; |