summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-11-24 18:39:11 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-11-24 18:39:11 +0000
commit07274b94953c507f76ef04abe045b9039a0cb9bb (patch)
treea126f0cc73ed9d52ec5595ffe21f21de72794d09
parent901ad50f25c946f1c6b6191cf22c4efc819208d5 (diff)
e transitions - add theme anim duration multiplier setting
this is a universal knob for "make those transtions faster". set it ot 0 and edje animations will essentially stop and be instant (take 0 time). if set to 1 - they will go at "theme defined", 2.0 == take twice as long etc. ... so for people who want "things to go faster" slid this down to where you like it. they dont actually go faster... e goes just as fast - just some transtion takes less time (fewer frames)... :) this has been in elm and edje for a long time but this makes the setting obvious to find.
-rw-r--r--src/modules/conf_theme/e_int_config_transitions.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/modules/conf_theme/e_int_config_transitions.c b/src/modules/conf_theme/e_int_config_transitions.c
index 256726b58..b98537836 100644
--- a/src/modules/conf_theme/e_int_config_transitions.c
+++ b/src/modules/conf_theme/e_int_config_transitions.c
@@ -19,6 +19,8 @@ struct _E_Config_Dialog_Data
19 char *transition_desk; 19 char *transition_desk;
20 char *transition_change; 20 char *transition_change;
21 21
22 double duration_factor;
23
22 Evas_Object *event_list; 24 Evas_Object *event_list;
23 Evas_Object *trans_list; 25 Evas_Object *trans_list;
24 Evas_Object *tp; 26 Evas_Object *tp;
@@ -58,6 +60,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
58 cfdata->transition_desk = strdup(e_config->transition_desk); 60 cfdata->transition_desk = strdup(e_config->transition_desk);
59 if (e_config->transition_change) 61 if (e_config->transition_change)
60 cfdata->transition_change = strdup(e_config->transition_change); 62 cfdata->transition_change = strdup(e_config->transition_change);
63 cfdata->duration_factor = elm_config_transition_duration_factor_get();
61} 64}
62 65
63static void * 66static void *
@@ -93,7 +96,9 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
93 (cfdata->transition_desk && e_config->transition_desk && 96 (cfdata->transition_desk && e_config->transition_desk &&
94 strcmp(cfdata->transition_desk, e_config->transition_desk)) || 97 strcmp(cfdata->transition_desk, e_config->transition_desk)) ||
95 (cfdata->transition_change && e_config->transition_change && 98 (cfdata->transition_change && e_config->transition_change &&
96 strcmp(cfdata->transition_change, e_config->transition_change)); 99 strcmp(cfdata->transition_change, e_config->transition_change)) ||
100 (!EINA_DBL_EQ(elm_config_transition_duration_factor_get(),
101 cfdata->duration_factor));
97} 102}
98 103
99static int 104static int
@@ -150,6 +155,14 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
150 /* e_config->transition_change = eina_stringshare_add(cfdata->transition_change); */ 155 /* e_config->transition_change = eina_stringshare_add(cfdata->transition_change); */
151 } 156 }
152 157
158 if (!EINA_DBL_EQ(elm_config_transition_duration_factor_get(),
159 cfdata->duration_factor))
160 {
161 elm_config_transition_duration_factor_set(cfdata->duration_factor);
162 elm_config_save();
163 elm_config_all_flush();
164 }
165
153 e_config_save_queue(); 166 e_config_save_queue();
154 167
155 EINA_LIST_FREE(trans, str) 168 EINA_LIST_FREE(trans, str)
@@ -162,7 +175,7 @@ static Evas_Object *
162_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) 175_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
163{ 176{
164 E_Zone *zone; 177 E_Zone *zone;
165 Evas_Object *o, *of, *il; 178 Evas_Object *o, *of, *il, *sl;
166 Eina_List *l; 179 Eina_List *l;
167 char *t; 180 char *t;
168 181
@@ -216,6 +229,11 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
216 e_widget_framelist_object_append(of, il); 229 e_widget_framelist_object_append(of, il);
217 e_widget_table_object_append(o, of, 0, 1, 2, 1, 1, 1, 1, 1); 230 e_widget_table_object_append(o, of, 0, 1, 2, 1, 1, 1, 1, 1);
218 231
232 of = e_widget_framelist_add(evas, _("Animation Period Multiplier"), 0);
233 sl = e_widget_slider_add(evas, 1, 0, _("%1.1f"), 0.0, 5.0, 0.1, 0,
234 &(cfdata->duration_factor), NULL, 150);
235 e_widget_framelist_object_append(of, sl);
236 e_widget_table_object_append(o, of, 0, 2, 2, 1, 1, 1, 1, 1);
219 237
220 return o; 238 return o;
221} 239}