Mercurial > molko
comparison examples/example-message.c @ 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 | e05a792f6910 |
children | 133926e08d6e |
comparison
equal
deleted
inserted
replaced
173:cd69c8791dac | 174:6992085d47fd |
---|---|
95 delay(20 - elapsed); | 95 delay(20 - elapsed); |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 static void | 99 static void |
100 my_draw_frame(struct theme *th, const struct frame *f) | 100 my_draw_frame(const struct theme *th, const struct frame *f) |
101 { | 101 { |
102 (void)th; | 102 (void)th; |
103 | 103 |
104 painter_set_color(0xff0000ff); | 104 painter_set_color(0xff0000ff); |
105 painter_draw_rectangle(f->x, f->y, f->w, f->h); | 105 painter_draw_rectangle(f->x, f->y, f->w, f->h); |