From: aman.jeph Date: Fri, 30 Oct 2020 17:05:47 +0000 (+0530) Subject: [TIZENIOT-1999] Fixed text overlapping in rename popup for larger text size X-Git-Tag: submit/tizen/20201106.125956~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=634e77553797ed684314e5de4fef5db77019795d;p=profile%2Fiot%2Fapps%2Fnative%2Fvideo-player.git [TIZENIOT-1999] Fixed text overlapping in rename popup for larger text size Change-Id: I575b8921d09e748482ae8d07891b56e052528670 Signed-off-by: aman.jeph --- diff --git a/res/edje/vp-entry-popup.edc b/res/edje/vp-entry-popup.edc index 37cf023..d2743f6 100755 --- a/res/edje/vp-entry-popup.edc +++ b/res/edje/vp-entry-popup.edc @@ -13,42 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define VP_POPUP_ENTRY_WIDTH_HEIGHT_MIN 0 76 -#define VP_POPUP_ENTRY_WIDTH_HEIGHT_MAX -1 76 -#define PV_POPUP_ENTRY_CONTENT_MIN 0 26 -#define PV_POPUP_ENTRY_CONTENT_MAX -1 26 -#define POPUP_CONTENT_PADDING_LEFT_MIN_INC 40 76 -#define POPUP_CONTENT_PADDING_RIGHT_MIN_INC 40 76 -images { - image: "textinput_input_line.png" COMP; -} -color_classes{ - color_class { "message_color_normal"; - color: 10 14 74 255; - } - color_class { "message_color_warning"; - color: 170 24 24 255; - } -} styles { - style { name: "inputfield_info_noraml"; - base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color:#0a0e4a color_class:message_color_normal ellipsis=1.0 wrap=none text_class=tizen"; + style { name: "inputfield_info_normal"; + base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color=#0a0e4a ellipsis=1.0 wrap=none"; } style { name: "inputfield_info_warning"; - base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color:#aa1818 color_class:message_color_warning ellipsis=1.0 wrap=none text_class=tizen"; + base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color=#aa1818 ellipsis=1.0 wrap=none"; } } group { name: "pv.popup.entry"; parts { - part { name:"bg"; + part { name:"base"; type: SPACER; scale: 1; description { state: "default" 0.0; - min: VP_POPUP_ENTRY_WIDTH_HEIGHT_MIN; - max: VP_POPUP_ENTRY_WIDTH_HEIGHT_MAX; - //color: 0 255 0 255; } } part { name: "pad_t"; @@ -59,98 +39,121 @@ group { name: "pv.popup.entry"; max: -1 12; fixed: 0 1; align: 0.0 0.0; - rel1 { to: "bg"; relative: 0.0 0.0; } - rel2 { to: "bg"; relative: 1.0 0.0; } - //color: 255 255 0 255; + rel1 { to: "base"; relative: 0.0 0.0; } + rel2 { to: "base"; relative: 1.0 0.0; } } } - //This swallow is 26 ..but in actual it is taking 29px - //So we have to increase overall size to 76 - part { name: "elm.swallow.content"; - type: SWALLOW; + part { name: "pad_b"; + type: SPACER; scale: 1; description { state: "default" 0.0; - min: PV_POPUP_ENTRY_CONTENT_MIN; - max: PV_POPUP_ENTRY_CONTENT_MAX; + min: 0 12; + max: -1 12; fixed: 0 1; - align: 0.0 0.0; - rel1 { relative: 0.0 1.0; to_x: "bg"; to_y: "pad_t"; } - rel2 { relative: 0.0 1.0; to_x: "inputfield.button.gap"; to_y: "pad_t"; } - color: 0 255 0 255; + align: 0.0 1.0; + rel1 { to: "base"; relative: 0.0 1.0; } + rel2 { to: "base"; relative: 1.0 1.0; } } } - part { name: "inputfield.button.gap"; - type:SPACER; + part { name: "content.area"; + type: SPACER; scale: 1; description { state: "default" 0.0; - min: 16 26; - max: 16 26; - rel1 { to: "elm.swallow.end"; relative: 0.0 1.0; } - rel2 { to: "elm.swallow.end"; relative: 0.0 1.0; } - align: 1.0 1.0; - //color: 255 0 0 255; + rel1{ to: "pad_t"; relative: 0.0 1.0; } + rel2{ to: "pad_b"; relative: 1.0 0.0; } } } - part { name: "elm.swallow.end"; - type: SWALLOW; + part { name: "message.text.area"; + type: SPACER; scale: 1; description { state: "default" 0.0; - min: 32 32; - max: 32 32; - fixed: 1 1; - align: 1.0 0.0; - rel1 { relative: 1.0 0.0; to: "bg"; offset: 0 9; } - rel2 { relative: 1.0 0.0; to: "bg"; offset: 0 0; } - color: 0 0 255 255; + min: 0 23; + rel1 { to: "content.area"; relative: 0.0 1.0; } + rel2 { to: "content.area"; relative: 1.0 1.0; } + align: 0.0 1.0; } } - part { name: "separator.line"; - type: IMAGE; + part { name: "pad.line"; + type: RECT; scale: 1; description { state: "default" 0.0; min: 0 1; max: -1 1; - fixed: 0 1; + rel1 {to: "message.text.area"; relative: 0.0 0.0; } + rel2 {to: "message.text.area"; relative: 1.0 0.0; } align: 0.0 0.0; - rel1 { to_x: "bg"; to_y: "elm.swallow.content"; relative: 0.0 1.0; } - rel2 { to_x: "bg"; to_y: "elm.swallow.content"; relative: 1.0 1.0; } - image.normal: textinput_input_line.png; + color: 10 14 74 255; + } + } + part { name: "textblock_area"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { to: "pad.line"; relative: 0.0 1.0; } + rel2 { to: "message.text.area"; relative: 1.0 1.0; } } } part { name: "inputfield.message"; - type: TEXT; + type: TEXTBLOCK; scale: 1; - mouse_events: 0; description { state: "default" 0.0; - min: 0 22; - max: -1 22; - rel1 { to: "separator.line"; relative: 0.0 1.0; }; - rel2 { to: "pad_b"; relative: 1.0 0.0; } + rel.to: "textblock_area"; text { - font: "Tizen:weight=Regular:width=BreezeSans"; - size: 18; - min: 1 0; - align: 0.0 0.5; - text_class: "tizen"; + text: "this is sample text to test."; + style: "inputfield_info_normal"; } - visible: 1; - color: 10 14 74 255; } description { state: "warning" 0.0; inherit: "default" 0.0; - color: 170 24 24 255; + text.style: "inputfield_info_warning"; } } - part { name: "pad_b"; + part { name: "input_area"; + type:SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { to: "pad_t"; relative: 0.0 1.0; } + rel2 { to: "message.text.area"; relative: 1.0 0.0; } + } + } + part { name: "button_area"; type: SPACER; scale: 1; description { state: "default" 0.0; - min: 0 12; - max: -1 12; - fixed: 0 1; - align: 0.0 1.0; - rel1 { to: "bg"; relative: 0.0 1.0; } - rel2 { to: "bg"; relative: 1.0 1.0; } + min: 48 0; // 48 = 32(Icon) + 16 (Padding) + max: 48 -1; + align: 1.0 0.0; + rel1 { to: "input_area"; relative: 1.0 0.0; } + rel2 { to: "input_area"; relative: 1.0 1.0; } + } + } + part { name: "entry_area"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1{ to: "input_area" ; relative: 0.0 0.0;} + rel2{ to_x: "button_area"; to_y: "message.text.area" ; relative: 0.0 0.0;} + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + //min: 0 26; + rel.to: "entry_area"; + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: 32 32; + max: 32 32; + rel.to: "button_area"; + rel1.relative: 1.0 0.0; + rel1.offset: 0 9; + align: 1.0 0.0; + //color: 0 0 255 255; } } } @@ -169,4 +172,3 @@ group { name: "pv.popup.entry"; } } } /* group */ - diff --git a/res/images/textinput_input_line.png b/res/images/textinput_input_line.png deleted file mode 100755 index c980476..0000000 Binary files a/res/images/textinput_input_line.png and /dev/null differ diff --git a/src/widget/mp-video-rename-ctrl.c b/src/widget/mp-video-rename-ctrl.c index 23dad05..4efcc97 100755 --- a/src/widget/mp-video-rename-ctrl.c +++ b/src/widget/mp-video-rename-ctrl.c @@ -690,12 +690,12 @@ Evas_Object *mp_rename_ctrl_show(void *pNaviFrameHandle, void *pUserData, elm_object_part_text_set(g_pRenameHandle->pPopUpHandle, "title,text", VIDEOS_RENAMEPOP_HEADER_RENAME); - evas_object_size_hint_weight_set(g_pRenameHandle->pPopUpHandle, - EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_weight_set(g_pRenameHandle->pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); pLayout = elm_layout_add(g_pRenameHandle->pPopUpHandle); elm_layout_file_set(pLayout, edj_path, "pv.popup.entry"); - evas_object_size_hint_min_set(pLayout, -1, 76); + evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); //Create entry Evas_Object *en = NULL;