summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2016-10-19 22:41:28 -0200
committerBruno Dilly <bdilly@profusion.mobi>2016-10-19 22:41:28 -0200
commit044184ef175579b6b439b1b9b4b879f1816a18cc (patch)
treeed7018bf864d9605c191ba7b2e36be37fe8ee956
parent2591bcbf88e430620d1490668d289a67b535e784 (diff)
Make guide be actually hidden when user disable it
Instead of being hidden it was being left visible but not tracking the cursor anymore. And when made visible again, its position only would be updated after mouse moves.
-rw-r--r--src/bin/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 948828b..781ae11 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -182,6 +182,22 @@ show_guides_apply(void)
182 182
183 EINA_LIST_FOREACH(zones, l, zone) 183 EINA_LIST_FOREACH(zones, l, zone)
184 { 184 {
185 if (show_guides)
186 {
187 evas_object_move(zone->guide_v, zone->last_mouse.x, 0);
188 evas_object_resize(zone->guide_v, 1, zone->h);
189 evas_object_show(zone->guide_v);
190
191 evas_object_move(zone->guide_h, 0, zone->last_mouse.y);
192 evas_object_resize(zone->guide_h, zone->w, 1);
193 evas_object_show(zone->guide_h);
194 }
195 else
196 {
197 evas_object_hide(zone->guide_v);
198 evas_object_hide(zone->guide_h);
199 }
200
185 elm_check_state_set(zone->gui.show_guides, show_guides); 201 elm_check_state_set(zone->gui.show_guides, show_guides);
186 } 202 }
187} 203}