diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-07-01 23:20:40 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-07-01 23:20:40 +0000 |
commit | cbe561b7c5690c53d138988b609c5491ce4a3f21 (patch) | |
tree | 0951cfb1a785df8c616fffac33042503c36c612c /riscos/hotlist.c | |
parent | 89bef6d65098476d38aa4fec7456a8bf4fd3d307 (diff) | |
download | netsurf-cbe561b7c5690c53d138988b609c5491ce4a3f21.tar.gz netsurf-cbe561b7c5690c53d138988b609c5491ce4a3f21.tar.bz2 |
[project @ 2004-07-01 23:20:40 by rjw]
Fix for icon selection colour in Select.
svn path=/import/netsurf/; revision=1038
Diffstat (limited to 'riscos/hotlist.c')
-rw-r--r-- | riscos/hotlist.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 03e12a5ee..81fa97d06 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -206,7 +206,9 @@ void ro_gui_hotlist_init(void) { text_icon.data.indirected_text.validation = null_text_string; text_icon.data.indirected_text.size = 256; sprite_icon.flags = wimp_ICON_SPRITE | wimp_ICON_INDIRECTED | - wimp_ICON_HCENTRED | wimp_ICON_VCENTRED; + wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | + (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) | + (wimp_COLOUR_VERY_LIGHT_GREY << wimp_ICON_BG_COLOUR_SHIFT); sprite_icon.data.indirected_sprite.area = wimpspriteop_AREA; sprite_icon.data.indirected_text.size = 12; @@ -353,10 +355,12 @@ void ro_gui_hotlist_visited_update(struct content *content, struct hotlist_entry xoswordreadclock_local_bcd(&bcd); entry->last_date = bcd.date_and_time; ro_gui_hotlist_update_entry_size(entry); - xwimp_force_redraw(hotlist_window, - entry->x0, entry->y0, - entry->x0 + entry->width, - entry->y0 + entry->height); + if (entry->expanded) { + xwimp_force_redraw(hotlist_window, + entry->x0, entry->y0, + entry->x0 + entry->width, + entry->y0 + entry->height); + } } } if (entry->child_entry) { @@ -748,6 +752,7 @@ int ro_gui_hotlist_redraw_item(struct hotlist_entry *entry, int level, int x0, i /* Update the selection state */ text_icon.flags = wimp_ICON_TEXT | (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) | + (wimp_COLOUR_VERY_LIGHT_GREY << wimp_ICON_BG_COLOUR_SHIFT) | wimp_ICON_INDIRECTED | wimp_ICON_VCENTRED; if (entry->selected) { sprite_icon.flags |= wimp_ICON_SELECTED; @@ -765,6 +770,12 @@ int ro_gui_hotlist_redraw_item(struct hotlist_entry *entry, int level, int x0, i if (entry->children != -1) { if ((entry->expanded) && (entry->children > 0)) { sprintf(icon_name, "small_diro"); + + /* Check it exists (pre-OS3.5) + */ + if (xwimpspriteop_read_sprite_info(icon_name, 0, 0, 0, 0)) { + sprintf(icon_name, "small_dir"); + } } else { sprintf(icon_name, "small_dir"); } |