summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-05-21 16:43:09 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-06-13 19:21:51 -0300
commit9f30870d64b8d17e7e09ace333e54f024b008944 (patch)
treeb50807fdb299140e298a6d54c89a1f6563d78ad1
parent5938b36622ba6ff1babac2577551f9c8c0e4136f (diff)
Backport: elm/framespace: Get the framespace from the theme.
Additionally, if the frame object can't be created (no theme group available), do not use it. This will enable us to have a borderless elm theme.
-rw-r--r--ChangeLog3
-rw-r--r--data/themes/widgets/border.edc5
-rw-r--r--src/lib/elm_win.c20
3 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f412ef37..38627141e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -824,3 +824,6 @@
824 824
8252013-06-11 Daniel Willmann 8252013-06-11 Daniel Willmann
826 * Make elm_tooltip more robust if not run inside X 826 * Make elm_tooltip more robust if not run inside X
827
8282013-06-13 Rafael Antognolli
829 * Get the framespace from the theme.
diff --git a/data/themes/widgets/border.edc b/data/themes/widgets/border.edc
index f979a04ff..35c4d9494 100644
--- a/data/themes/widgets/border.edc
+++ b/data/themes/widgets/border.edc
@@ -24,7 +24,10 @@ color_classes {
24 24
25group { 25group {
26 name: "elm/border/base/default"; 26 name: "elm/border/base/default";
27 data.item: "focus_highlight" "off"; 27 data {
28 item: "focus_highlight" "off";
29 item: "framespace" "0 22 0 26";
30 }
28 images { 31 images {
29 image: "bd_top.png" COMP; 32 image: "bd_top.png" COMP;
30 image: "bd_top_hilight.png" COMP; 33 image: "bd_top_hilight.png" COMP;
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index d46bacebd..80a30354b 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -2101,11 +2101,22 @@ static void
2101_elm_win_frame_add(Elm_Win_Smart_Data *sd, 2101_elm_win_frame_add(Elm_Win_Smart_Data *sd,
2102 const char *style) 2102 const char *style)
2103{ 2103{
2104 evas_output_framespace_set(sd->evas, 0, 22, 0, 26); 2104 const char *framespacestr;
2105 int fx = 0, fy = 0, fw = 0, fh = 0;
2105 2106
2106 sd->frame_obj = edje_object_add(sd->evas); 2107 sd->frame_obj = edje_object_add(sd->evas);
2107 elm_widget_theme_object_set 2108 if (!elm_widget_theme_object_set
2108 (ELM_WIDGET_DATA(sd)->obj, sd->frame_obj, "border", "base", style); 2109 (ELM_WIDGET_DATA(sd)->obj, sd->frame_obj, "border", "base", style))
2110 {
2111 evas_object_del(sd->frame_obj);
2112 sd->frame_obj = NULL;
2113 return;
2114 }
2115
2116 framespacestr = edje_object_data_get(sd->frame_obj, "framespace");
2117 if (framespacestr)
2118 sscanf(framespacestr, "%d %d %d %d", &fx, &fy, &fw, &fh);
2119 evas_output_framespace_set(sd->evas, fx, fy, fw, fh);
2109 2120
2110 evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE); 2121 evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
2111 evas_object_move(sd->frame_obj, 0, 0); 2122 evas_object_move(sd->frame_obj, 0, 0);
@@ -3146,7 +3157,8 @@ elm_win_fullscreen_set(Evas_Object *obj,
3146 ENGINE_COMPARE(ELM_WAYLAND_EGL)) 3157 ENGINE_COMPARE(ELM_WAYLAND_EGL))
3147 _elm_win_frame_add(sd, "default"); 3158 _elm_win_frame_add(sd, "default");
3148 3159
3149 evas_object_show(sd->frame_obj); 3160 if (sd->frame_obj)
3161 evas_object_show(sd->frame_obj);
3150 } 3162 }
3151 3163
3152 TRAP(sd, fullscreen_set, fullscreen); 3164 TRAP(sd, fullscreen_set, fullscreen);