summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2016-10-19 22:17:04 -0200
committerBruno Dilly <bdilly@profusion.mobi>2016-10-19 22:17:04 -0200
commit2591bcbf88e430620d1490668d289a67b535e784 (patch)
treed106ecc0f3bbdc9844749cb999bebe70d4fc0046
parent085ad7a328003a6484e8e9d4f6db4f9052bb1d49 (diff)
Make checkbox consistent with hex color state
If changed via shortcut the checkbox wouldn't be updated.
-rw-r--r--src/bin/main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 0552ee3..948828b 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -163,6 +163,18 @@ theme_apply(Evas_Object *edje, const char *group)
163} 163}
164 164
165static void 165static void
166show_hexa_apply(void)
167{
168 const Eina_List *l;
169 const Zone *zone;
170
171 EINA_LIST_FOREACH(zones, l, zone)
172 {
173 elm_check_state_set(zone->gui.hex_colors, hex_colors);
174 }
175}
176
177static void
166show_guides_apply(void) 178show_guides_apply(void)
167{ 179{
168 const Eina_List *l; 180 const Eina_List *l;
@@ -1096,6 +1108,7 @@ _zone_gui_show_hex_colors_changed(void *data EINA_UNUSED, Evas_Object *o, void *
1096{ 1108{
1097 Eina_Bool state = elm_check_state_get(o); 1109 Eina_Bool state = elm_check_state_get(o);
1098 hex_colors = state; 1110 hex_colors = state;
1111 show_hexa_apply();
1099} 1112}
1100 1113
1101static void 1114static void
@@ -2128,7 +2141,10 @@ _zone_win_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSE
2128 elm_check_state_set(zone->gui.zoom, state); 2141 elm_check_state_set(zone->gui.zoom, state);
2129 } 2142 }
2130 else if (strcmp(keyname, "x") == 0) 2143 else if (strcmp(keyname, "x") == 0)
2131 hex_colors = !hex_colors; 2144 {
2145 hex_colors = !hex_colors;
2146 show_hexa_apply();
2147 }
2132 else if (strcmp(keyname, "space") == 0) 2148 else if (strcmp(keyname, "space") == 0)
2133 { 2149 {
2134 if (!zone->handling) 2150 if (!zone->handling)