diff options
author | pohlinkzei <pohlinkzei@gmx-topmail.de> | 2015-12-27 22:31:29 +0100 |
---|---|---|
committer | pohlinkzei <pohlinkzei@gmx-topmail.de> | 2015-12-27 22:31:29 +0100 |
commit | 46f67d8937cfef6158eeee6e5ed039d29fc1b8f7 (patch) | |
tree | f7f09952c04b6c6c005f8c3d0bc41fced4496749 /navit/osd.c | |
parent | 0d7420e06ce4d64a1a1c8a8ca35d3ae81fa8ccc5 (diff) | |
download | navit-46f67d8937cfef6158eeee6e5ed039d29fc1b8f7.tar.gz |
Add customizable OSD attribute foreground_color to every OSD item tobe able to change the OSD from standard white to every color
Diffstat (limited to 'navit/osd.c')
-rw-r--r-- | navit/osd.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/navit/osd.c b/navit/osd.c index 8bc0eb50c..26e8952ee 100644 --- a/navit/osd.c +++ b/navit/osd.c @@ -273,10 +273,10 @@ osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags) item->flags=flags; item->osd_configuration=-1; - item->color_white.r = 0xffff; - item->color_white.g = 0xffff; - item->color_white.b = 0xffff; - item->color_white.a = 0xffff; + item->color_fg.r = 0xffff; + item->color_fg.g = 0xffff; + item->color_fg.b = 0xffff; + item->color_fg.a = 0xffff; item->text_color.r = 0xffff; item->text_color.g = 0xffff; item->text_color.b = 0xffff; @@ -335,6 +335,9 @@ osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags) attr=attr_search(attrs, NULL, attr_text_color); if (attr) item->text_color=*attr->u.color; + attr=attr_search(attrs, NULL, attr_foreground_color); + if (attr) + item->color_fg=*attr->u.color; attr=attr_search(attrs, NULL, attr_accesskey); if (attr) item->accesskey = g_strdup(attr->u.str); @@ -403,8 +406,8 @@ osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *p graphics_gc_set_foreground(item->graphic_bg, &item->color_bg); graphics_background_gc(item->gr, item->graphic_bg); - item->graphic_fg_white = graphics_gc_new(item->gr); - graphics_gc_set_foreground(item->graphic_fg_white, &item->color_white); + item->graphic_fg = graphics_gc_new(item->gr); + graphics_gc_set_foreground(item->graphic_fg, &item->color_fg); if (item->flags & 2) { item->font = graphics_named_font_new(item->gr, item->font_name, item->font_size, 1); |