raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4fe9144c9dac0df02cfcd5b2d11f2a9438285056

commit 4fe9144c9dac0df02cfcd5b2d11f2a9438285056
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Jan 13 18:04:17 2017 +0900

    efl_ui_win - switch to the element being used for border type
---
 data/elementary/themes/edc/elm/border.edc |  8 ++++----
 src/lib/elementary/efl_ui_win.c           | 17 ++++++++++-------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 1c0d2d8..83ebdb2 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -994,8 +994,8 @@ group { name: "elm/border/base/default";
    }
 }
 
-group { name: "elm/border/base/dialog";
-   inherit: "elm/border/base/default";
+group { name: "elm/border/dialog/default";
+   inherit:   "elm/border/base/default";
    parts {
       text {  "elm.text.title";
          clip: "top_clip";
@@ -1061,11 +1061,11 @@ group { name: "elm/border/base/dialog";
    }
 }
 
-group { name: "elm/border/base/naviframe";
+group { name: "elm/border/naviframe/default";
+   inherit:   "elm/border/dialog/default";
    images.image: "sym_left_dark_normal.png" COMP;
    images.image: "sym_left_glow_normal.png" COMP;
    images.image: "sym_left_light_normal.png" COMP;
-   inherit: "elm/border/base/dialog";
    parts {
       image { "close1";
          desc { "default";
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 38a58e1..e76c73b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -340,7 +340,7 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
 static void
 _elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
 static Elm_Theme_Apply _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd);
-static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style);
+static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const 
char *style);
 static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool 
force_emit, Eina_Bool calc);
 static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char 
*engine);
 static void _elm_win_resize_objects_eval(Evas_Object *obj);
@@ -4134,7 +4134,7 @@ _efl_system_theme_path_get(void)
 }
 
 static void
-_elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
+_elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
 {
    Evas_Object *obj = sd->obj;
    int w, h, mw, mh, v;
@@ -4150,7 +4150,7 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
    if (EINA_LIKELY(v >= FRAME_OBJ_THEME_MIN_VERSION))
      {
         if (!elm_widget_theme_object_set
-            (sd->obj, sd->frame_obj, "border", "base", style))
+            (sd->obj, sd->frame_obj, "border", element, style))
           {
              ERR("Failed to set main border theme for the window.");
              ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
@@ -5103,7 +5103,8 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, 
const char *name, Elm_W
    /* do not append to list; all windows render as black rects */
    if (type != ELM_WIN_FAKE)
      {
-        const char *style = "default";
+        const char *element = "base";
+        const char *style;
 
         _elm_win_list = eina_list_append(_elm_win_list, obj);
         _elm_win_count++;
@@ -5113,13 +5114,15 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data 
*sd, const char *name, Elm_W
           {
              TRAP(sd, fullscreen_set, 1);
           }
+        style = elm_widget_style_get(obj);
+        if (!style) style = "default";
         switch (type)
           {
-           case EFL_UI_WIN_DIALOG_BASIC:    style = "dialog"; break;
-           case EFL_UI_WIN_NAVIFRAME_BASIC: style = "naviframe"; break;
+           case EFL_UI_WIN_DIALOG_BASIC:    element = "dialog"; break;
+           case EFL_UI_WIN_NAVIFRAME_BASIC: element = "naviframe"; break;
            default: break;
           }
-        _elm_win_frame_add(sd, style);
+        _elm_win_frame_add(sd, element, style);
 
         if (_elm_config->focus_highlight_enable)
           elm_win_focus_highlight_enabled_set(obj, EINA_TRUE);

-- 


Reply via email to