Browse Source

fix toggle buttons not showing the toggled SVGs when clicked

master
Alexandros Theodotou 3 years ago
parent
commit
4f99c80ace
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 5
      src/ztk_button.c

5
src/ztk_button.c

@ -76,7 +76,10 @@ button_draw_cb ( @@ -76,7 +76,10 @@ button_draw_cb (
/* TODO draw label */
break;
case ZTK_BTN_SVG:
if (state & ZTK_WIDGET_STATE_PRESSED)
if ((state & ZTK_WIDGET_STATE_PRESSED) ||
(self->is_toggle &&
self->toggled_getter (
self, widget->user_data)))
{
DRAW_SVG (clicked_svg);
}

Loading…
Cancel
Save