mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
Set icon position with respect to TREE_LINE_HEIGHT.
svn path=/trunk/netsurf/; revision=11041
This commit is contained in:
parent
eabf7e8afd
commit
d1d3a65b06
@ -1520,6 +1520,7 @@ static void tree_draw_node_element(struct tree *tree,
|
|||||||
bool selected = false;
|
bool selected = false;
|
||||||
hlcache_handle *icon;
|
hlcache_handle *icon;
|
||||||
plot_font_style_t *fstyle;
|
plot_font_style_t *fstyle;
|
||||||
|
const int icon_inset = (TREE_LINE_HEIGHT - TREE_ICON_SIZE) / 2;
|
||||||
|
|
||||||
assert(tree != NULL);
|
assert(tree != NULL);
|
||||||
assert(element != NULL);
|
assert(element != NULL);
|
||||||
@ -1535,15 +1536,14 @@ static void tree_draw_node_element(struct tree *tree,
|
|||||||
switch (element->type) {
|
switch (element->type) {
|
||||||
case NODE_ELEMENT_TEXT_PLUS_ICON:
|
case NODE_ELEMENT_TEXT_PLUS_ICON:
|
||||||
icon = element->bitmap;
|
icon = element->bitmap;
|
||||||
if (icon != NULL &&
|
if (icon != NULL && (content_get_status(icon) ==
|
||||||
(content_get_status(icon) ==
|
CONTENT_STATUS_READY ||
|
||||||
CONTENT_STATUS_READY ||
|
content_get_status(icon) ==
|
||||||
content_get_status(icon) ==
|
CONTENT_STATUS_DONE)) {
|
||||||
CONTENT_STATUS_DONE)) {
|
content_redraw(icon , x, y + icon_inset,
|
||||||
content_redraw(icon , x, y + 2,
|
TREE_ICON_SIZE, TREE_ICON_SIZE,
|
||||||
TREE_ICON_SIZE, TREE_ICON_SIZE,
|
x, y + icon_inset, x + TREE_ICON_SIZE,
|
||||||
x, y + 2, x + TREE_ICON_SIZE,
|
y + icon_inset + TREE_ICON_SIZE, 1, 0);
|
||||||
y + 2 + TREE_ICON_SIZE, 1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x += NODE_INSTEP;
|
x += NODE_INSTEP;
|
||||||
|
Loading…
Reference in New Issue
Block a user