group "Elm_Config" struct {
- value "config_version" int: 131074;
+ value "config_version" int: 131075;
value "engine" string: "";
value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 1;
value "audio_mute_all" uchar: 0;
value "win_auto_focus_enable" uchar: 1;
value "win_auto_focus_animate" uchar: 1;
+ value "transition_duration_factor" double:1.0;
group "color_palette" list {
group "Elm_Custom_Palette" struct {
value "palette_name" string: "default";
group "Elm_Config" struct {
- value "config_version" int: 131074;
+ value "config_version" int: 131075;
value "engine" string: "";
value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 1;
value "audio_mute_all" uchar: 0;
value "win_auto_focus_enable" uchar: 1;
value "win_auto_focus_animate" uchar: 1;
+ value "transition_duration_factor" double: 1.0;
group "color_palette" list {
group "Elm_Custom_Palette" struct {
value "palette_name" string: "default";
group "Elm_Config" struct {
- value "config_version" int: 131074;
+ value "config_version" int: 131075;
value "engine" string: "";
value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 0;
value "audio_mute_all" uchar: 0;
value "win_auto_focus_enable" uchar: 1;
value "win_auto_focus_animate" uchar: 1;
+ value "transition_duration_factor" double: 1.0;
group "color_palette" list {
group "Elm_Custom_Palette" struct {
value "palette_name" string: "default";
}
static void
+transition_duration_change(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ double val = elm_slider_value_get(obj);
+ Eina_Bool scale = elm_config_transition_duration_factor_get();
+
+ if (scale == val) return;
+ elm_config_transition_duration_factor_set(val);
+ elm_config_save();
+ elm_config_all_flush();
+}
+
+static void
_status_basic(Evas_Object *win,
Evas_Object *bx0)
{
ts_min_friction, ts_friction_standard, ts_border_friction,
ts_sensitivity_friction, ts_acceleration_threshold,
ts_acceleration_time_limit, ts_acceleration_weight, page_friction,
- bring_in_friction, zoom_friction;
+ bring_in_friction, zoom_friction, transition_duration;
const char *curr_theme;
Eina_Bool s_bounce, ts;
Elm_Theme *th;
flush_interval = elm_config_cache_flush_interval_get();
font_c = elm_config_cache_font_cache_size_get();
image_c = elm_config_cache_image_cache_size_get();
+ transition_duration = elm_config_transition_duration_factor_get();
edje_file_c = elm_config_cache_edje_file_cache_size_get();
edje_col_c = elm_config_cache_edje_collection_cache_size_get();
elm_theme_set(th, curr_theme);
elm_object_theme_set(evas_object_data_get(win, "theme_preview"), th);
elm_theme_free(th);
+ elm_config_transition_duration_factor_set(transition_duration);
eina_stringshare_del(curr_theme);
}
_status_config_etc(Evas_Object *win,
Evas_Object *naviframe)
{
- Evas_Object *bx, *ck;
+ Evas_Object *bx, *ck, *sl, *fr, *bx2;
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
CHECK_ADD("Enable ATSPI support", "Set atspi mode", atspi_change, NULL);
elm_check_state_set(ck, elm_config_atspi_mode_get());
+ // transition duration in edje
+ fr = elm_frame_add(bx);
+ elm_object_text_set(fr, "Edje Transition Duration Factor");
+ evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, 0.5);
+ elm_box_pack_end(bx, fr);
+ evas_object_show(fr);
+
+ bx2 = elm_box_add(fr);
+ elm_object_content_set(fr, bx2);
+ evas_object_show(bx2);
+
+ sl = elm_slider_add(bx2);
+ evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+ elm_slider_span_size_set(sl, 120);
+ elm_slider_unit_format_set(sl, "%1.1f");
+ elm_slider_indicator_format_set(sl, "%1.1f");
+ elm_slider_min_max_set(sl, 0, 20.0);
+ elm_slider_value_set(sl, elm_config_transition_duration_factor_get());
+ elm_box_pack_end(bx2, sl);
+ evas_object_show(sl);
+ evas_object_smart_callback_add(sl, "changed", sc_round, NULL);
+ evas_object_smart_callback_add(sl, "delay,changed", transition_duration_change, NULL);
+
evas_object_data_set(win, "etc", bx);
elm_naviframe_item_simple_push(naviframe, bx);
ELM_CONFIG_VAL(D, T, atspi_mode, T_UCHAR);
ELM_CONFIG_VAL(D, T, win_auto_focus_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, win_auto_focus_animate, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, transition_duration_factor, T_DOUBLE);
#undef T
#undef D
#undef T_INT
edje_scale_set(_elm_config->scale);
edje_password_show_last_set(_elm_config->password_show_last);
edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
+ edje_transition_duration_factor_set(_elm_config->transition_duration_factor);
if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
edje_audio_channel_mute_set(EDJE_CHANNEL_EFFECT, _elm_config->audio_mute_effect);
edje_audio_channel_mute_set(EDJE_CHANNEL_BACKGROUND, _elm_config->audio_mute_background);
_elm_config->gl_depth = 0;
_elm_config->gl_msaa = 0;
_elm_config->gl_stencil = 0;
+ _elm_config->transition_duration_factor = 1.0;
}
static void
_elm_config->win_auto_focus_animate = tcfg->win_auto_focus_animate;
IFCFGEND
+ IFCFG(0x0003)
+ _elm_config->transition_duration_factor = tcfg->transition_duration_factor;
+ IFCFGEND
+
/**
* Fix user config for current ELM_CONFIG_EPOCH here.
**/
if (s) _elm_config->magnifier_scale = _elm_atof(s);
s = getenv("ELM_ATSPI_MODE");
if (s) _elm_config->atspi_mode = ELM_ATSPI_MODE_ON;
+
+ s = getenv("ELM_TRANSITION_DURATION_FACTOR");
+ if (s) _elm_config->transition_duration_factor = atof(s);
}
static void
}
}
+EAPI void
+elm_config_transition_duration_factor_set(double factor)
+{
+ if (factor < 0.0) return;
+ if (_elm_config->transition_duration_factor == factor) return;
+ _elm_config->transition_duration_factor = factor;
+ edje_transition_duration_factor_set(_elm_config->transition_duration_factor);
+}
+
+
+EAPI double
+elm_config_transition_duration_factor_get(void)
+{
+ return _elm_config->transition_duration_factor;
+}
+
void
_elm_config_profile_set(const char *profile)
{
*/
/**
+ * Set the transition duration factor
+ *
+ * This function sets the edje transition duration factor
+ * It will affect the duration of edje transitions
+ *
+ * @param factor The duration factor for transition in edje
+ *
+ * @note This value affect duration of transitions in edje
+ *
+ * @since 1.15
+ *
+ * @see edje_transition_duration_set() for more details
+ */
+EAPI void elm_config_transition_duration_factor_set(double factor);
+
+/**
+ * Get the duration factor of transitions
+ *
+ * @return The duration factor of transition in edje
+ *
+ * @since 1.15
+ */
+EAPI double elm_config_transition_duration_factor_get(void);
+
+/**
* @}
*/
* the users config doesn't need to be wiped - simply new values need
* to be put in
*/
-#define ELM_CONFIG_FILE_GENERATION 0x0002
+#define ELM_CONFIG_FILE_GENERATION 0x0003
#define ELM_CONFIG_VERSION_EPOCH_OFFSET 16
#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << ELM_CONFIG_VERSION_EPOCH_OFFSET) | \
ELM_CONFIG_FILE_GENERATION)
unsigned char audio_mute_all;
unsigned char win_auto_focus_enable;
unsigned char win_auto_focus_animate;
+ double transition_duration_factor;
Eina_List *bindings;
Eina_Bool atspi_mode;
int gl_depth;