From d203f5f3558f689dad27df384141bbf62a2cc6a8 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Tue, 21 May 2013 12:16:49 +0900 Subject: [PATCH] [naviframe] Apply the dual title area size of the GUI v.5.1 Change-Id: I19b8263d926db4e12cbe26e9a3fdffd9371c8393 --- themes/inc/tizen-hd-inc.edc | 3 ++ themes/widgets/naviframe.edc | 74 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/themes/inc/tizen-hd-inc.edc b/themes/inc/tizen-hd-inc.edc index 156c547..1ab26d9 100644 --- a/themes/inc/tizen-hd-inc.edc +++ b/themes/inc/tizen-hd-inc.edc @@ -60,6 +60,9 @@ #define NAVIFRAME_TITLE_SMALL_FONT_SIZE_INC 44 #define NAVIFRAME_LANDSCAPE_TITLE_SMALL_FONT_SIZE_INC 38 #define NAVIFRAME_DUAL_TITLE_FONT_SIZE_INC 50 +#define NAVIFRAME_DUAL_TITLE1_MIN_W_INC 188 +#define NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_ONE_BUTTON_INC 280 +#define NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_TWO_BUTTON_INC 237 #define NAVIFRAME_ICON_SIZE_INC 45 45 #define NAVIFRAME_PADDING_INC 16 0 #define NAVIFRAME_LANDSCAPE_PADDING_INC 34 0 diff --git a/themes/widgets/naviframe.edc b/themes/widgets/naviframe.edc index 9806170..77b5c37 100644 --- a/themes/widgets/naviframe.edc +++ b/themes/widgets/naviframe.edc @@ -3143,6 +3143,7 @@ public tbar_bg = 0; //Toolbar BG Show call count public toolbar_buttons_visible = 0; //when both toolbar buttons are visible public tbar_close = 0; //Toolbar lastest Open/Close status + public title_buttons_visible = 0; //when both title buttons are visible public landscape = 0; //Landscape mode status } parts { @@ -3292,18 +3293,24 @@ visible: 0; } } - part { name: "text_area_center_padding"; + part { name: "title1_max_area"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; - max: 30 -1; - align: 0.5 0.0; + min: NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_ONE_BUTTON_INC 0; + max: NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_ONE_BUTTON_INC -1; + align: 0.0 0.5; fixed: 1 1; rel1 { relative: 1.0 1.0; to_x: "padding_center_text1"; to_y: "top_padding"; } - rel2 { relative: 0.0 0.0; to_x: "padding_center_text2"; to_y: "padding_bottom_text"; } + rel2 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "padding_bottom_text"; } visible: 0; } + description { state: "buttons_set" 0.0; + inherit: "default" 0.0; + min: NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_TWO_BUTTON_INC 0; + max: NAVIFRAME_DUAL_TITLE1_MAX_W_WITH_TWO_BUTTON_INC -1; + } } part { name: "elm.text.title"; type: TEXT; @@ -3322,8 +3329,8 @@ color3: 255 255 255 255; align: 0.0 0.5; fixed: 1 1; - rel1 { relative: 1.0 1.0; to_x: "padding_center_text1"; to_y: "top_padding"; } - rel2 { relative: 0.0 0.0; to_x: "text_area_center_padding"; to_y: "padding_bottom_text"; } + rel1 { to: "title1_max_area"; } + rel2 { to: "title1_max_area"; } } description { state: "selected" 0.0; inherit: "default" 0.0; @@ -3345,13 +3352,16 @@ } } part { name: "click_event_title1_area"; - type: RECT; - ignore_flags: ON_HOLD; - description { state: "default" 0.0; - rel1 { to: "elm.text.title"; } - rel2 { to: "elm.text.title"; } - color: 0 0 0 0; - } + type: RECT; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + min: NAVIFRAME_DUAL_TITLE1_MIN_W_INC 0; + align: 0.0 0.5; + fixed: 1 1; + rel1 { to: "elm.text.title"; } + rel2 { to: "elm.text.title"; } + color: 0 0 0 0; + } } part { name: "text.padding"; type: RECT; @@ -3361,8 +3371,8 @@ min: 30 0; align: 0.0 0.0; fixed: 1 0; - rel1 { relative: 1.0 0.0; to: "elm.text.title"; } - rel2 { relative: 1.0 1.0; to: "elm.text.title"; } + rel1 { relative: 1.0 0.0; to: "click_event_title1_area"; } + rel2 { relative: 1.0 1.0; to: "click_event_title1_area"; } visible: 0; } } @@ -3958,6 +3968,40 @@ set_state(PART:"title_bg", "hide", 0.0); } } + program { name: "title_left_btn_show"; + signal: "elm,state,title_left_btn,show"; + source: "elm"; + script { + set_int(title_buttons_visible, get_int(title_buttons_visible) + 1); + if (get_int(title_buttons_visible) >= 2) + set_state(PART:"title1_max_area", "buttons_set", 0.0); + } + } + program { name: "title_left_btn_hide"; + signal: "elm,state,title_left_btn,hide"; + source: "elm"; + script { + set_int(title_buttons_visible, get_int(title_buttons_visible) - 1); + set_state(PART:"title1_max_area", "default", 0.0); + } + } + program { name: "title_right_btn_show"; + signal: "elm,state,title_right_btn,show"; + source: "elm"; + script { + set_int(title_buttons_visible, get_int(title_buttons_visible) + 1); + if (get_int(title_buttons_visible) >= 2) + set_state(PART:"title1_max_area", "buttons_set", 0.0); + } + } + program { name: "title_right_btn_hide"; + signal: "elm,state,title_right_btn,hide"; + source: "elm"; + script { + set_int(title_buttons_visible, get_int(title_buttons_visible) - 1); + set_state(PART:"title1_max_area", "default", 0.0); + } + } program { name: "prev_btn_show"; signal: "elm,state,prev_btn,show"; source: "elm"; -- 2.7.4