value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
value "focus_autoscroll_mode" uchar: 0;
+ value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
value "focus_autoscroll_mode" uchar: 0;
+ value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
value "focus_autoscroll_mode" uchar: 0;
+ value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
ELM_CONFIG_VAL(D, T, focus_highlight_clip_disable, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_move_policy, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_autoscroll_mode, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, slider_indicator_visible_mode, T_INT);
ELM_CONFIG_VAL(D, T, item_select_on_focus_disable, T_UCHAR);
ELM_CONFIG_VAL(D, T, first_item_focus_on_first_focus_in, T_UCHAR);
ELM_CONFIG_VAL(D, T, toolbar_shrink_mode, T_INT);
else
_elm_config->focus_autoscroll_mode = ELM_FOCUS_AUTOSCROLL_MODE_SHOW;
}
-
+ s = getenv("ELM_SLIDER_INDICATOR_VISIBLE_MODE");
+ if (s)
+ {
+ if (!strcmp(s, "ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT"))
+ _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT;
+ else if (!strcmp(s, "ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS"))
+ _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS;
+ else if (!strcmp(s, "ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS"))
+ _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS;
+ else
+ _elm_config->slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE;
+ }
s = getenv("ELM_THEME");
if (s) eina_stringshare_replace(&_elm_config->theme, s);
}
EAPI void
+elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visible_Mode mode)
+{
+ _elm_config->slider_indicator_visible_mode = mode;
+}
+
+EAPI Elm_Slider_Indicator_Visible_Mode
+elm_config_slider_indicator_visible_mode_get(void)
+{
+ return _elm_config->slider_indicator_visible_mode;
+}
+
+EAPI void
elm_config_focus_autoscroll_mode_set(Elm_Focus_Autoscroll_Mode mode)
{
_elm_config->focus_autoscroll_mode = mode;
EAPI void elm_config_focus_autoscroll_mode_set(Elm_Focus_Autoscroll_Mode mode);
/**
+ * Slider's indicator visiblity mode.
+ *
+ * @since 1.12
+ * @ingroup Slider
+ */
+
+typedef enum
+{
+ ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT, /**< show indicator on mouse down or change in slider value */
+ ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS, /**< Always show the indicator. */
+ ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS, /**< Show the indicator on focus */
+ ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE /**< Never show the indicator */
+} Elm_Slider_Indicator_Visible_Mode;
+
+/**
+ * Sets the slider's indicator visible mode.
+ *
+ * @param obj The slider object.
+ * @param mode Elm_Slider_Indicator_Visible_Mode.
+ * viewport.
+ *
+ * @ingroup Slider
+ * @since 1.12
+ */
+EAPI void elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visible_Mode mode);
+
+/**
+ * Get the slider's indicator visible mode.
+ *
+ * @param obj The slider object.
+ * @return @c ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT if not set anything by the user.
+ * @c ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS, ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS,
+ * ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE if any of the above is set by user.
+ *
+ * @ingroup Slider
+ * @since 1.12
+ */
+EAPI Elm_Slider_Indicator_Visible_Mode elm_config_slider_indicator_visible_mode_get(void);
+
+/**
* @}
*/
unsigned char item_select_on_focus_disable; /**< This shows the disabled status of select on focus feature. This value is false by default so that select on focus feature is enabled by default.*/
unsigned char first_item_focus_on_first_focus_in; /**< This sets the first item focus on first focus in feature*/
Elm_Focus_Autoscroll_Mode focus_autoscroll_mode; /**< This shows the focus auto scroll mode. By default, @c ELM_FOCUS_AUTOSCROLL_MODE_SHOW is set. */
+ Elm_Slider_Indicator_Visible_Mode slider_indicator_visible_mode; /**< this sets the slider indicator visible mode */
int toolbar_shrink_mode;
unsigned char fileselector_expand_enable;
unsigned char fileselector_double_tap_navigation_enable;
const char *source EINA_UNUSED)
{
ELM_SLIDER_DATA_GET(data, sd);
- if (sd->popup)
+ if (sd->popup && _elm_config->slider_indicator_visible_mode != ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE)
{
evas_object_raise(sd->popup);
evas_object_show(sd->popup);
if (!sd->popup_visible || !sd->popup) return;
- if (!(elm_widget_focus_get(data) && sd->always_popup_show))
+ if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) return;
+
+ if (!((elm_widget_focus_get(data)) &&
+ (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
{
// XXX: for compat
edje_object_signal_emit(sd->popup, "popup,hide", "elm");
ELM_SLIDER_DATA_GET(data, sd);
if (sd->popup)
{
- if (!(elm_widget_focus_get(data) && sd->always_popup_show))
+ if (!((elm_widget_focus_get(data)) &&
+ (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
{
evas_object_hide(sd->popup);
sd->popup_visible = EINA_FALSE;
return NULL;
}
+static void
+_on_show(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS)
+ _popup_show(obj, NULL, NULL, NULL);
+}
+
EOLIAN static void
_elm_slider_evas_object_smart_add(Eo *obj, Elm_Slider_Data *priv)
{
evas_object_event_callback_add
(priv->spacer, EVAS_CALLBACK_MOUSE_UP, _spacer_up_cb, obj);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL);
+
elm_widget_can_focus_set(obj, EINA_TRUE);
_elm_access_object_register(obj, wd->resize_obj);
}
EOLIAN static void
-_elm_slider_indicator_show_on_focus_set(Eo *obj EINA_UNUSED, Elm_Slider_Data *sd, Eina_Bool flag)
+_elm_slider_indicator_show_on_focus_set(Eo *obj EINA_UNUSED, Elm_Slider_Data *sd EINA_UNUSED, Eina_Bool flag)
{
if (flag)
- sd->always_popup_show = EINA_TRUE;
+ elm_config_slider_indicator_visible_mode_set(ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS);
else
- sd->always_popup_show = EINA_FALSE;
+ elm_config_slider_indicator_visible_mode_set(ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT);
}
EOLIAN static Eina_Bool
-_elm_slider_indicator_show_on_focus_get(Eo *obj EINA_UNUSED, Elm_Slider_Data *sd)
+_elm_slider_indicator_show_on_focus_get(Eo *obj EINA_UNUSED, Elm_Slider_Data *sd EINA_UNUSED)
{
- return sd->always_popup_show;
+ return (elm_config_slider_indicator_visible_mode_get() == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS);
}
EOLIAN static Eina_Bool
}
EOLIAN static Eina_Bool
-_elm_slider_elm_widget_on_focus(Eo *obj, Elm_Slider_Data *sd)
+_elm_slider_elm_widget_on_focus(Eo *obj, Elm_Slider_Data *sd EINA_UNUSED)
{
Eina_Bool int_ret = EINA_FALSE;
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus());
- if (sd->always_popup_show && elm_widget_focus_get(obj))
+ if ((_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && elm_widget_focus_get(obj))
_popup_show(obj, NULL, NULL, NULL);
else
_popup_hide(obj, NULL, NULL, NULL);