diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-25 14:44:57 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-25 14:44:57 +0300 |
commit | 3dee6c5d167044fae4159e6e657ce547ab32f854 (patch) | |
tree | 9b0ac2986bb7dd695f4e61c19b85f61289c97df2 /src/ui/labelwidget.c | |
parent | b5eef5cbddab73c7bdcd5be00e8228377b0a4ef1 (diff) |
Right/center-aligned text; fixed menu shortcuts
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index f24e2573..c9ac0b60 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -193,16 +193,20 @@ static void draw_LabelWidget_(const iLabelWidget *d) { | |||
193 | iString str; | 193 | iString str; |
194 | init_String(&str); | 194 | init_String(&str); |
195 | keyStr_LabelWidget_(d, &str); | 195 | keyStr_LabelWidget_(d, &str); |
196 | draw_Text(uiShortcuts_FontId, negX_I2(add_I2(topRight_Rect(bounds), negX_I2(padding_()))), | 196 | drawAlign_Text(uiShortcuts_FontId, |
197 | flags & pressed_WidgetFlag ? fg : cyan_ColorId, cstr_String(&str)); | 197 | add_I2(topRight_Rect(bounds), negX_I2(padding_())), |
198 | flags & pressed_WidgetFlag ? fg : cyan_ColorId, | ||
199 | right_Alignment, | ||
200 | cstr_String(&str)); | ||
198 | deinit_String(&str); | 201 | deinit_String(&str); |
199 | } | 202 | } |
200 | } | 203 | } |
201 | else if (flags & alignRight_WidgetFlag) { | 204 | else if (flags & alignRight_WidgetFlag) { |
202 | draw_Text( | 205 | drawAlign_Text( |
203 | d->font, | 206 | d->font, |
204 | mul_I2(init_I2(-1, 1), add_I2(topRight_Rect(bounds), negX_I2(padding_()))), | 207 | add_I2(topRight_Rect(bounds), negX_I2(padding_())), |
205 | fg, | 208 | fg, |
209 | right_Alignment, | ||
206 | cstr_String(&d->label)); | 210 | cstr_String(&d->label)); |
207 | } | 211 | } |
208 | else { | 212 | else { |