aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authornirajkr <niraj.kr@samsung.com>2014-02-05 19:17:41 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-02-05 19:23:34 +0900
commit2a8c2f1b53d883206f2b819326176a30a9ff7b77 (patch)
treea4ea7a32ddebbd11e810907701839bc937eebe46 /legacy/elementary/src/lib/elm_win.c
parententry: Add elm_entry_select_region_set API (diff)
downloadefl-2a8c2f1b53d883206f2b819326176a30a9ff7b77.tar.gz
focus: Added elm_object_focus_highlight_style_get/set() to support custom focus highlight on widget
Summary: This new API will allow widget to have its own focus highlight style Reviewers: seoz CC: woohyun, singh.amitesh Differential Revision: https://phab.enlightenment.org/D501
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index b878ba879f..de10924e68 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -767,6 +767,8 @@ _elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
Eina_Bool visible_changed;
Eina_Bool common_visible;
const char *sig = NULL;
+ const char *focus_style_target = NULL;
+ const char *focus_style_previous = NULL;
_elm_win_focus_highlight_reconfigure_job_stop(sd);
@@ -801,13 +803,21 @@ _elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
if ((!target) || (!common_visible) || (sd->focus_highlight.cur.in_theme))
goto the_end;
- if (sd->focus_highlight.theme_changed)
+ focus_style_previous = elm_widget_focus_highlight_style_get(previous);
+ focus_style_target = elm_widget_focus_highlight_style_get(target);
+
+ if (sd->focus_highlight.theme_changed ||
+ (focus_style_target != focus_style_previous))
{
const char *str;
- if (sd->focus_highlight.style)
+
+ if (focus_style_target)
+ str = focus_style_target;
+ else if (sd->focus_highlight.style)
str = sd->focus_highlight.style;
else
str = "default";
+
elm_widget_theme_object_set
(sd->obj, fobj, "focus_highlight", "top", str);
sd->focus_highlight.theme_changed = EINA_FALSE;