Mercurial > molko
comparison examples/example-label.c @ 161:31d7f23c0588
ui: label no longer has w, h fields
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 17 Oct 2020 10:12:41 +0200 |
parents | c3a40062acc2 |
children | 133926e08d6e |
comparison
equal
deleted
inserted
replaced
160:22141b6b2e43 | 161:31d7f23c0588 |
---|---|
102 if (!window_open("Example - Label", W, H)) | 102 if (!window_open("Example - Label", W, H)) |
103 panic(); | 103 panic(); |
104 | 104 |
105 for (size_t i = 0; i < NELEM(table); ++i) { | 105 for (size_t i = 0; i < NELEM(table); ++i) { |
106 struct label *l = &table[i].label; | 106 struct label *l = &table[i].label; |
107 unsigned int w, h; | |
107 | 108 |
108 label_query(l); | 109 label_query(l, &w, &h); |
109 align(table[i].align, &l->x, &l->y, l->w, l->h, 0, 0, W, H); | 110 align(table[i].align, &l->x, &l->y, w, h, 0, 0, W, H); |
110 } | 111 } |
111 } | 112 } |
112 | 113 |
113 static void | 114 static void |
114 quit(void) | 115 quit(void) |