focus: Added focus highlight clip disable feature.
focus highlight is clipped by the clipper of focus target object. But many of the times, this clipping looks weird so I made this configurable. This fixes T1056 but as this fix was done by adding a new feature, this patch would not be backported. @feature
This commit is contained in:
parent
e60e43f8f5
commit
7e35760942
|
@ -44,6 +44,7 @@ group "Elm_Config" struct {
|
|||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
value "focus_highlight_animate" uchar: 0;
|
||||
value "focus_highlight_clip_disable" uchar: 0;
|
||||
value "toolbar_shrink_mode" int: 3;
|
||||
value "fileselector_expand_enable" uchar: 0;
|
||||
value "inwin_dialogs_enable" uchar: 1;
|
||||
|
|
|
@ -44,6 +44,7 @@ group "Elm_Config" struct {
|
|||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
value "focus_highlight_animate" uchar: 0;
|
||||
value "focus_highlight_clip_disable" uchar: 0;
|
||||
value "toolbar_shrink_mode" int: 3;
|
||||
value "fileselector_expand_enable" uchar: 0;
|
||||
value "inwin_dialogs_enable" uchar: 1;
|
||||
|
|
|
@ -44,6 +44,7 @@ group "Elm_Config" struct {
|
|||
value "cursor_engine_only" uchar: 1;
|
||||
value "focus_highlight_enable" uchar: 0;
|
||||
value "focus_highlight_animate" uchar: 0;
|
||||
value "focus_highlight_clip_disable" uchar: 1;
|
||||
value "toolbar_shrink_mode" int: 3;
|
||||
value "fileselector_expand_enable" uchar: 1;
|
||||
value "fileselector_double_tap_navigation_enable" uchar: 1;
|
||||
|
|
|
@ -503,6 +503,7 @@ _desc_init(void)
|
|||
ELM_CONFIG_VAL(D, T, cursor_engine_only, T_UCHAR);
|
||||
ELM_CONFIG_VAL(D, T, focus_highlight_enable, T_UCHAR);
|
||||
ELM_CONFIG_VAL(D, T, focus_highlight_animate, T_UCHAR);
|
||||
ELM_CONFIG_VAL(D, T, focus_highlight_clip_disable, T_UCHAR);
|
||||
ELM_CONFIG_VAL(D, T, toolbar_shrink_mode, T_INT);
|
||||
ELM_CONFIG_VAL(D, T, fileselector_expand_enable, T_UCHAR);
|
||||
ELM_CONFIG_VAL(D, T, fileselector_double_tap_navigation_enable, T_UCHAR);
|
||||
|
@ -1501,6 +1502,7 @@ _config_load(void)
|
|||
_elm_config->cursor_engine_only = EINA_TRUE;
|
||||
_elm_config->focus_highlight_enable = EINA_FALSE;
|
||||
_elm_config->focus_highlight_animate = EINA_TRUE;
|
||||
_elm_config->focus_highlight_clip_disable = EINA_FALSE;
|
||||
_elm_config->toolbar_shrink_mode = 2;
|
||||
_elm_config->fileselector_expand_enable = EINA_FALSE;
|
||||
_elm_config->fileselector_double_tap_navigation_enable = EINA_FALSE;
|
||||
|
@ -2054,6 +2056,9 @@ _env_get(void)
|
|||
s = getenv("ELM_FOCUS_HIGHLIGHT_ANIMATE");
|
||||
if (s) _elm_config->focus_highlight_animate = !!atoi(s);
|
||||
|
||||
s = getenv("ELM_FOCUS_HIGHLIGHT_CLIP_DISABLE");
|
||||
if (s) _elm_config->focus_highlight_clip_disable = !!atoi(s);
|
||||
|
||||
s = getenv("ELM_TOOLBAR_SHRINK_MODE");
|
||||
if (s) _elm_config->toolbar_shrink_mode = atoi(s);
|
||||
|
||||
|
@ -2564,6 +2569,19 @@ elm_config_focus_highlight_animate_set(Eina_Bool animate)
|
|||
_elm_config->focus_highlight_animate = !!animate;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_config_focus_highlight_clip_disabled_get(void)
|
||||
{
|
||||
return _elm_config->focus_highlight_clip_disable;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_config_focus_highlight_clip_disabled_set(Eina_Bool disable)
|
||||
{
|
||||
_elm_config->focus_highlight_clip_disable = !!disable;
|
||||
}
|
||||
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_config_scroll_bounce_enabled_get(void)
|
||||
{
|
||||
|
|
|
@ -1206,6 +1206,33 @@ EAPI Eina_Bool elm_config_focus_highlight_animate_get(void);
|
|||
*/
|
||||
EAPI void elm_config_focus_highlight_animate_set(Eina_Bool animate);
|
||||
|
||||
/**
|
||||
* Get the disable status of the focus highlight clip feature.
|
||||
*
|
||||
* @return The focus highlight clip disable status
|
||||
*
|
||||
* Get whether the focus highlight clip feature is disabled. If disabled return
|
||||
* @c EINA_TRUE, else return @c EINA_FALSE. If the return is @c EINA_TRUE, focus
|
||||
* highlight clip feature is not disabled so the focus highlight can be clipped.
|
||||
*
|
||||
* @see elm_config_focus_highlight_clip_disabled_set()
|
||||
* @since 1.10
|
||||
* @ingroup Focus
|
||||
*/
|
||||
EAPI Eina_Bool elm_config_focus_highlight_clip_disabled_get(void);
|
||||
|
||||
/**
|
||||
* Set the disable status of the focus highlight clip feature.
|
||||
*
|
||||
* @param disable Disable focus highlight clip feature if @c EINA_TRUE, enable
|
||||
* it otherwise.
|
||||
*
|
||||
* @see elm_config_focus_highlight_clip_disabled_get()
|
||||
* @since 1.10
|
||||
* @ingroup Focus
|
||||
*/
|
||||
EAPI void elm_config_focus_highlight_clip_disabled_set(Eina_Bool disable);
|
||||
|
||||
/**
|
||||
* Get the system mirrored mode. This determines the default mirrored mode
|
||||
* of widgets.
|
||||
|
|
|
@ -222,6 +222,7 @@ struct _Elm_Config
|
|||
unsigned char cursor_engine_only;
|
||||
unsigned char focus_highlight_enable;
|
||||
unsigned char focus_highlight_animate;
|
||||
unsigned char focus_highlight_clip_disable; /**< This shows disabled status of focus highlight clip feature. This value is false by default so the focus highlight is clipped. */
|
||||
int toolbar_shrink_mode;
|
||||
unsigned char fileselector_expand_enable;
|
||||
unsigned char fileselector_double_tap_navigation_enable;
|
||||
|
|
|
@ -715,6 +715,8 @@ _elm_win_focus_highlight_anim_setup(Elm_Win_Smart_Data *sd,
|
|||
elm_widget_focus_highlight_geometry_get(previous, &px, &py, &pw, &ph, EINA_FALSE);
|
||||
evas_object_move(obj, tx, ty);
|
||||
evas_object_resize(obj, tw, th);
|
||||
|
||||
if (!_elm_config->focus_highlight_clip_disable)
|
||||
evas_object_clip_unset(obj);
|
||||
|
||||
m = alloca(sizeof(*m) + (sizeof(int) * 8));
|
||||
|
@ -737,12 +739,16 @@ _elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
|
|||
Evas_Object *clip, *target = sd->focus_highlight.cur.target;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
clip = evas_object_clip_get(target);
|
||||
elm_widget_focus_highlight_geometry_get(target, &x, &y, &w, &h, EINA_TRUE);
|
||||
|
||||
evas_object_move(obj, x, y);
|
||||
evas_object_resize(obj, w, h);
|
||||
|
||||
if (!_elm_config->focus_highlight_clip_disable)
|
||||
{
|
||||
clip = evas_object_clip_get(target);
|
||||
if (clip) evas_object_clip_set(obj, clip);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue