comparison libmlk-ui/mlk/ui/button.c @ 487:f2d3c5a97884

ui: align -> mlk_align
author David Demelier <markand@malikania.fr>
date Tue, 28 Feb 2023 13:08:58 +0100
parents 02b16dd49b54
children 441c37e7474f
comparison
equal deleted inserted replaced
486:d6757c30658e 487:f2d3c5a97884
58 if (lw > button->w) 58 if (lw > button->w)
59 mlk_tracef("button width is too small for text: %u < %u", button->w, lw); 59 mlk_tracef("button width is too small for text: %u < %u", button->w, lw);
60 if (lh > button->h) 60 if (lh > button->h)
61 mlk_tracef("button height is too small for text: %u < %u", button->h, lh); 61 mlk_tracef("button height is too small for text: %u < %u", button->h, lh);
62 62
63 align(ALIGN_CENTER, &label.x, &label.y, lw, lh, 63 mlk_align(MLK_ALIGN_CENTER, &label.x, &label.y, lw, lh,
64 button->x, button->y, button->w, button->h); 64 button->x, button->y, button->w, button->h);
65 65
66 mlk_painter_set_color(0x577277ff); 66 mlk_painter_set_color(0x577277ff);
67 mlk_painter_draw_rectangle(button->x, button->y, button->w, button->h); 67 mlk_painter_draw_rectangle(button->x, button->y, button->w, button->h);
68 68