Mercurial > molko
diff libui/ui/button.h @ 174:6992085d47fd
ui: major theme overhaul, closes #2509 @1h
- The font does not contain a color anymore,
- Add a new color argument to font_render,
- Theme are stored `const` in UI elements to promise no modifications,
- Also make all <ui>_draw function to take a const widget too.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 22 Oct 2020 15:16:43 +0200 |
parents | 1008a796a9e7 |
children |
line wrap: on
line diff
--- a/libui/ui/button.h Wed Oct 21 12:50:11 2020 +0200 +++ b/libui/ui/button.h Thu Oct 22 15:16:43 2020 +0200 @@ -49,7 +49,7 @@ unsigned int h; /*!< (+) Height. */ const char *text; /*!< (+&) Text to draw. */ enum button_state state; /*!< (+) Button state. */ - struct theme *theme; /*!< (+&?) Theme to use. */ + const struct theme *theme; /*!< (+&?) Theme to use. */ }; /** @@ -84,7 +84,7 @@ * \param button the button */ void -button_draw_default(struct theme *t, const struct button *button); +button_draw_default(const struct theme *t, const struct button *button); /** * Draw the button. @@ -93,7 +93,7 @@ * \param button the button */ void -button_draw(struct button *button); +button_draw(const struct button *button); /** * Convert the button into an action.