freemyipod r832 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r831‎ | r832 | r833 >
Date:18:30, 25 December 2011
Author:theseven
Status:new
Tags:
Comment:
libui: Allow for the text associated with an iconflow chooser item to have a background
Modified paths:
  • /libs/ui/chooser_renderer_iconflow.c (modified) (history)
  • /libs/ui/chooser_renderer_iconflow.h (modified) (history)

Diff [purge]

Index: libs/ui/chooser_renderer_iconflow.c
@@ -168,7 +168,7 @@
169169 {
170170 tx = params->text_pos.x - strlen(iparams->text) * get_font_width() / 2;
171171 ty = params->text_pos.y;
172 - rendertext(buf, tx, ty, stride, iparams->text_color, 0, iparams->text);
 172+ rendertext(buf, tx, ty, stride, iparams->text_color, iparams->text_bgcolor, iparams->text);
173173 }
174174 }
175175 if (icon->loc.buf.addr && io && ix >= x && iy >= y
Index: libs/ui/chooser_renderer_iconflow.h
@@ -29,7 +29,7 @@
3030 #include "chooser.h"
3131
3232
33 -#define CHOOSER_RENDERER_ICONFLOW_PARAMS_VERSION 2
 33+#define CHOOSER_RENDERER_ICONFLOW_PARAMS_VERSION 3
3434
3535 struct chooser_renderer_iconflow_params
3636 {
@@ -58,6 +58,7 @@
5959 struct libui_surface icon_selected;
6060 const char* text;
6161 uint32_t text_color;
 62+ uint32_t text_bgcolor;
6263 void (*render)(struct chooser_data* data, const struct chooser_item* item,
6364 bool selected, int x, int y, int opacity, int textx, int texty);
6465 };