From 11496a50b7c8a1d4b91273e2d3ceb60d8686c0ce Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Wed, 10 Feb 2016 12:39:52 +0200 Subject: [PATCH] TizenRefApp-5680 [Call] Reimplement quick-panel layout for supporting portrait and landscape mode Change-Id: I126d32c2bfd5f687ea6be902d8a96f56cd2a2d69 --- CMakeLists.txt | 1 - inc/callui-view-layout.h | 8 - inc/callui.h | 2 - res/edje/call.edc | 1 - .../callui-view-quick-pannel-landscape.edc | 390 --------------------- .../edc/call_edc/callui-view-quick-pannel.edc | 315 ++++++++++++----- src/callui-common.c | 16 - src/callui-view-quickpanel.c | 39 +-- src/callui.c | 6 +- 9 files changed, 258 insertions(+), 520 deletions(-) delete mode 100644 res/edje_src/edc/call_edc/callui-view-quick-pannel-landscape.edc diff --git a/CMakeLists.txt b/CMakeLists.txt index c2386ec..fc96294 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,6 @@ ADD_CUSTOM_COMMAND( ${EDC_SRC_DIR}/call_edc/callui_view_end_call.edc ${EDC_SRC_DIR}/call_edc/callui-view-lock-screen.edc ${EDC_SRC_DIR}/call_edc/callui-view-quick-pannel.edc - ${EDC_SRC_DIR}/call_edc/callui-view-quick-pannel-landscape.edc ${EDC_SRC_DIR}/call_edc/callui_view_incoming_active.edc ${EDC_SRC_DIR}/call_edc/callui-view-one-hold-in-conference.edc ${EDC_SRC_DIR}/call_edc/callui-view-elements.edc diff --git a/inc/callui-view-layout.h b/inc/callui-view-layout.h index 76b6543..fd8e306 100755 --- a/inc/callui-view-layout.h +++ b/inc/callui-view-layout.h @@ -35,10 +35,6 @@ #define MAIN_LAYOUT_W MAIN_SCREEN_W #define MAIN_LAYOUT_H MAIN_SCREEN_H -#define QP_WIN_W MAIN_SCREEN_W -// TODO: need to check and correct if is needed -#define QP_WIN_H 208 - #define NORMAL_HOLD_FONT_SIZE 36 #define CALLER_INFO_L_PAD 0 @@ -210,10 +206,6 @@ #define REL_W(x) ((x)/MAIN_SCREEN_W) #define REL_H(y) ((y)/MAIN_LAYOUT_H) -/* Relative X & Y positions of widgets w.r.t. Quick-panel layout */ -#define REL_QP_W(x) ((x)/QP_WIN_W) -#define REL_QP_H(y) ((y)/QP_WIN_H) - /* Relative X & Y positions of widgets w.r.t. Quick-panel button layout */ #define REL_QP_BTN_W(x) ((x)/QP_CALL_ICON_WIDTH) #define REL_QP_BTN_H(y) ((y)/QP_CALL_ICON_HEIGHT) diff --git a/inc/callui.h b/inc/callui.h index 6b26ea3..c048b7f 100755 --- a/inc/callui.h +++ b/inc/callui.h @@ -95,7 +95,6 @@ #define GRP_MULTICALL "multicall-list" #define GRP_REJECT_MSG "reject_with_msg" #define GRP_QUICKPANEL "quickpanel" -#define GRP_QUICKPANEL_LS "quickpanel_ls" #define GRP_SEPARATOR_LAYOUT "separator-layout" #define GRP_SEPARATOR_LAYOUT_1BUTTON "separator-layout-1button" #define GRP_SEPARATOR_LAYOUT_2BUTTON "separator-layout-2button" @@ -209,7 +208,6 @@ typedef struct appdata { /*quickpanel*/ Evas_Object *win_quickpanel; - bool landscape; Evas_Object *quickpanel_layout; char *quickpanel_text; } callui_app_data_t; diff --git a/res/edje/call.edc b/res/edje/call.edc index d0c58de..adc0749 100644 --- a/res/edje/call.edc +++ b/res/edje/call.edc @@ -90,7 +90,6 @@ collections { #include "../edje_src/edc/call_edc/callui_view_end_call.edc" #include "../edje_src/edc/call_edc/callui-view-lock-screen.edc" #include "../edje_src/edc/call_edc/callui-view-quick-pannel.edc" - #include "../edje_src/edc/call_edc/callui-view-quick-pannel-landscape.edc" #include "../edje_src/edc/call_edc/callui_view_incoming_active.edc" #include "../edje_src/edc/call_edc/callui-view-one-hold-in-conference.edc" #include "../edje_src/edc/call_edc/callui-view-elements.edc" diff --git a/res/edje_src/edc/call_edc/callui-view-quick-pannel-landscape.edc b/res/edje_src/edc/call_edc/callui-view-quick-pannel-landscape.edc deleted file mode 100644 index 6422be6..0000000 --- a/res/edje_src/edc/call_edc/callui-view-quick-pannel-landscape.edc +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#define LAND_QP_W MAIN_SCREEN_H -#define LAND_QP_H 172 - -#define LAND_RECT_QP_W(x) ((x)/LAND_QP_W) -#define LAND_RECT_QP_H(y) ((y)/LAND_QP_H) - -#define LAND_BTN_OFFSET 40 -#define LAND_TEXT_OFFSET 30 -#define LAND_BTN_OFFSET_LAST_W 32 -#define LAND_BTN_OFFSET_LAST_H 42 -#define LAND_BTN_SIZE 90 -#define LAND_IMAGE_SIZE 96 -#define LAND_TEXT_SIZE 98 -#define LAND_TEXT_NAME_SIZE 55 - -#define LAND_RECT_QT_BTN_X0(x) (LAND_RECT_QP_W(LAND_QP_W-((x*LAND_BTN_SIZE)+LAND_BTN_OFFSET_LAST_W+((x-1)*LAND_BTN_OFFSET)))) -#define LAND_RECT_QT_BTN_X1(x) (LAND_RECT_QP_W(LAND_QP_W-((x*LAND_BTN_SIZE)+LAND_BTN_OFFSET_LAST_W+(x*LAND_BTN_OFFSET)))) - -#define LAND_CALL_QP_TEXT_RECT_INCO_X0 LAND_RECT_QP_W(((2*LAND_BTN_OFFSET_LAST_W)+LAND_IMAGE_SIZE)) -#define LAND_CALL_QP_TEXT_RECT_INCO_Y0 LAND_RECT_QP_H(LAND_TEXT_OFFSET) -#define LAND_CALL_QP_TEXT_RECT_INCO_X1 LAND_RECT_QT_BTN_X0(2) -#define LAND_CALL_QP_TEXT_RECT_INCO_Y1 LAND_RECT_QP_H((LAND_QP_H-LAND_BTN_OFFSET_LAST_H)) - -#define LAND_CALL_QP_TEXT_RECT_DURING_X0 LAND_RECT_QP_W(LAND_BTN_OFFSET_LAST_W) -#define LAND_CALL_QP_TEXT_RECT_DURING_X1 LAND_RECT_QT_BTN_X0(3) - -#define LAND_CALL_QP_CONTACT_IMAGE_X0 LAND_RECT_QP_W(LAND_BTN_OFFSET_LAST_W) -#define LAND_CALL_QP_CONTACT_IMAGE_Y0 LAND_RECT_QP_H(LAND_TEXT_OFFSET) -#define LAND_CALL_QP_CONTACT_IMAGE_X1 LAND_RECT_QP_W(LAND_BTN_OFFSET_LAST_W+LAND_IMAGE_SIZE) -#define LAND_CALL_QP_CONTACT_IMAGE_Y1 LAND_RECT_QP_H((LAND_QP_H-LAND_BTN_OFFSET_LAST_H)) - -#define LAND_CALL_QP_CONTACT_NAME_X0 (0.0) -#define LAND_CALL_QP_CONTACT_NAME_Y0 (0.0) -#define LAND_CALL_QP_CONTACT_NAME_X1 (1.0) -#define LAND_CALL_QP_CONTACT_NAME_Y1 (LAND_TEXT_NAME_SIZE/LAND_TEXT_SIZE) - -#define LAND_CALL_QP_TIMER_X0 (0.0) -#define LAND_CALL_QP_TIMER_Y0 (LAND_TEXT_NAME_SIZE/LAND_TEXT_SIZE) -#define LAND_CALL_QP_TIMER_X1 (1.0) -#define LAND_CALL_QP_TIMER_Y1 (1.0) - -styles { - style { - name: "style_caller_name1"; - base: "font=Tizen:style=Regular font_size=40 color=#FFFFFF color_class="ATO005QP" align=left ellipsis=1.0 text_class=ATO005QP"; - } - style { - name: "style_call_time1"; - base: "font=Tizen:style=Regular font_size=30 color=#FFFFFF color_class="ATO006QP" align=left ellipsis=1.0 text_class=ATO006QP"; - } -} - -group { - name: "quickpanel_ls"; - - parts { - part { name: "background"; - type: RECT; - description { - state: "default" 0.0; - fixed: 1 1; - color: COLOR_BG_ALPHA; - } - } - - part { name: "txt_area"; - type: SPACER; - scale: 1; - description { - state: "default" 0.0; - fixed: 1 1; - rel1 { relative: LAND_CALL_QP_TEXT_RECT_INCO_X0 LAND_CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: LAND_CALL_QP_TEXT_RECT_INCO_X1 LAND_CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} - } - description { - state: "incoming" 0.0; - inherit: "default" 0.0; - } - description { - state: "during" 0.0; - inherit: "default" 0.0; - rel1 { relative: LAND_CALL_QP_TEXT_RECT_DURING_X0 LAND_CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: LAND_CALL_QP_TEXT_RECT_DURING_X1 LAND_CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} - } - description { - state: "resume" 0.0; - inherit: "default" 0.0; - rel1 { relative: LAND_CALL_QP_TEXT_RECT_DURING_X0 LAND_CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: LAND_CALL_QP_TEXT_RECT_DURING_X1 LAND_CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} - } - description { - state: "outgoing" 0.0; - inherit: "default" 0.0; - } - } - - part { name: "swallow.speaker_button"; - type: SWALLOW; - scale: 1; - description { - state: "default" 0.0; - fixed: 1 1; - rel1 { relative: LAND_RECT_QT_BTN_X0(2) LAND_RECT_QP_H(LAND_BTN_OFFSET); to: "background";} - rel2 { relative: LAND_RECT_QT_BTN_X1(1) LAND_RECT_QP_H((LAND_QP_H - LAND_BTN_OFFSET_LAST_H)); to: "background";} - } - description { - state: "incoming" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "during" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "outgoing" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "resume" 0.0; - inherit: "default" 0.0; - rel1 { relative: LAND_RECT_QT_BTN_X0(3) LAND_RECT_QP_H(LAND_BTN_OFFSET); to: "background";} - rel2 { relative: LAND_RECT_QT_BTN_X1(2) LAND_RECT_QP_H((LAND_QP_H - LAND_BTN_OFFSET_LAST_H)); to: "background";} - visible: 1; - } - } - - part { name: "txt_call_name"; - type: TEXTBLOCK; - scale: 1; - description { - state: "default" 0.0; - fixed: 1 1; - rel1 { relative: LAND_CALL_QP_CONTACT_NAME_X0 LAND_CALL_QP_CONTACT_NAME_Y0; to: "txt_area";} - rel2 { relative: LAND_CALL_QP_CONTACT_NAME_X1 LAND_CALL_QP_CONTACT_NAME_Y1; to: "txt_area";} - align: 0.0 0.5; - text { - ellipsis: 0.0; - fit: 0 1; - align: 0.0 0.5; - style: "style_caller_name1"; - text_class: ATO005QP; - } - color_class: "ATO005QP"; - } - } - - part { name: "txt_timer"; - type: TEXTBLOCK; - scale: 1; - description { - state: "default" 0.0; - fixed: 1 1; - rel1 { relative: LAND_CALL_QP_TIMER_X0 LAND_CALL_QP_TIMER_Y0; to: "txt_area";} - rel2 { relative: LAND_CALL_QP_TIMER_X1 LAND_CALL_QP_TIMER_Y1; to: "txt_area";} - fixed: 1 1; - text { - align: 0.0 0.5; - ellipsis: 1.0; - fit: 0 1; - style: "style_call_time1"; - } - color_class: "ATO006QP"; - } - } - - part { name: "caller_id"; - type: SWALLOW; - scale: 1; - description { - fixed: 1 1; - state: "default" 0.0; - rel1 { relative: LAND_CALL_QP_CONTACT_IMAGE_X0 LAND_CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: LAND_CALL_QP_CONTACT_IMAGE_X1 LAND_CALL_QP_CONTACT_IMAGE_Y1;} - } - description { - state: "incoming" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "during" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "outgoing" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "resume" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "show" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - - part { name: "caller_id_mask"; - type: IMAGE; - scale: 1; - description { - visible: 0; - fixed: 1 1; - rel1 { relative: LAND_CALL_QP_CONTACT_IMAGE_X0 LAND_CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: LAND_CALL_QP_CONTACT_IMAGE_X1 LAND_CALL_QP_CONTACT_IMAGE_Y1;} - image { - normal: IMG_SRC_DIR/"call_photo_id_mask.png"; - } - aspect_preference: SOURCE; - } - description { - state: "incoming" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "during" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "outgoing" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "resume" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "show" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - - part { name: "caller_id_img"; - type: IMAGE; - scale: 1; - description { - visible: 0; - fixed: 1 1; - rel1 { relative: LAND_CALL_QP_CONTACT_IMAGE_X0 LAND_CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: LAND_CALL_QP_CONTACT_IMAGE_X1 LAND_CALL_QP_CONTACT_IMAGE_Y1;} - image { - normal: IMG_SRC_DIR/"call_photo_id.png"; - } - aspect_preference: SOURCE; - color_class: "AO001"; - } - description { - state: "incoming" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "during" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "outgoing" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "resume" 0.0; - inherit: "default" 0.0; - visible: 0; - } - description { - state: "show" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - SWALLOW_BUTTON("swallow.mute_button", 3, 2, 0, 1, 0, 0); - SWALLOW_BUTTON("swallow.resume_button", 2, 1, 0, 0, 0, 1); - SWALLOW_BUTTON("swallow.call_button", 2, 1, 1, 0, 0, 0); - SWALLOW_BUTTON("swallow.end_button", 1, 0, 1, 1, 1, 0); - } - programs{ - program { - name: "resume_call"; - signal: "resume_call"; - source: "*"; - action: STATE_SET "resume" 0.0; - target: "swallow.mute_button"; - target: "swallow.speaker_button"; - target: "swallow.call_button"; - target: "swallow.resume_button"; - target: "caller_id_img"; - target: "caller_id_mask"; - target: "caller_id"; - target: "txt_area"; - } - program { - name: "outgoing_call"; - signal: "outgoing_call"; - source: "*"; - action: STATE_SET "outgoing" 0.0; - target: "swallow.mute_button"; - target: "swallow.speaker_button"; - target: "swallow.call_button"; - target: "swallow.resume_button"; - target: "txt_area"; - } - program { - name: "incoming_call"; - signal: "incoming_call"; - source: "*"; - action: STATE_SET "incoming" 0.0; - target: "swallow.mute_button"; - target: "swallow.speaker_button"; - target: "swallow.call_button"; - target: "swallow.resume_button"; - target: "txt_area"; - } - program { - name: "during_call"; - signal: "during_call"; - source: "*"; - action: STATE_SET "during" 0.0; - target: "swallow.mute_button"; - target: "swallow.speaker_button"; - target: "swallow.call_button"; - target: "swallow.resume_button"; - target: "caller_id_img"; - target: "caller_id_mask"; - target: "caller_id"; - target: "txt_area"; - } - program { - name: "show_image"; - signal: "show_image"; - source: "*"; - action: STATE_SET "show" 0.0; - target: "caller_id_mask"; - target: "caller_id_img"; - } - program { - name: "hide_image"; - signal: "hide_image"; - source: "*"; - action: STATE_SET "hide" 0.0; - target: "caller_id_mask"; - target: "caller_id_img"; - } - } -} diff --git a/res/edje_src/edc/call_edc/callui-view-quick-pannel.edc b/res/edje_src/edc/call_edc/callui-view-quick-pannel.edc index 99d14bc..d0159f1 100644 --- a/res/edje_src/edc/call_edc/callui-view-quick-pannel.edc +++ b/res/edje_src/edc/call_edc/callui-view-quick-pannel.edc @@ -15,46 +15,25 @@ * */ -#define QP_W MAIN_SCREEN_W -#define QP_H 172 -#define RECT_QP_W(x) ((x)/QP_W) -#define RECT_QP_H(y) ((y)/QP_H) +#define QP_H 172 +#define QP_BG_PAD_R 32 +#define QP_BG_PAD_L 32 +#define QP_BG_PAD_B 42 -#define BTN_OFFSET 40 -#define TEXT_OFFSET 30 -#define BTN_OFFSET_LAST_W 32 -#define BTN_OFFSET_LAST_H 42 -#define BTN_SIZE 90 -#define IMAGE_SIZE 96 -#define TEXT_SIZE 98 -#define TEXT_NAME_SIZE 55 +#define QP_CONTACT_ICON_PAD_T 34 +#define QP_CONTACT_ICON_PAD_R 32 +#define QP_CONTACT_ICON_SIZE 96 96 -#define RECT_QT_BTN_X0(x) (RECT_QP_W(QP_W-((x*BTN_SIZE)+BTN_OFFSET_LAST_W+((x-1)*BTN_OFFSET)))) -#define RECT_QT_BTN_X1(x) (RECT_QP_W(QP_W-((x*BTN_SIZE)+BTN_OFFSET_LAST_W+(x*BTN_OFFSET)))) +#define QP_BTN_PAD_T 40 +#define QP_BTN_GAP 40 +#define QP_BTN_SIZE 90 90 -#define CALL_QP_TEXT_RECT_INCO_X0 RECT_QP_W(((2*BTN_OFFSET_LAST_W)+IMAGE_SIZE)) -#define CALL_QP_TEXT_RECT_INCO_Y0 RECT_QP_H(TEXT_OFFSET) -#define CALL_QP_TEXT_RECT_INCO_X1 RECT_QT_BTN_X0(2) -#define CALL_QP_TEXT_RECT_INCO_Y1 RECT_QP_H((QP_H-BTN_OFFSET_LAST_H)) +#define QP_TEXT_AREA_PAD_T 30 +#define QP_TEXT_AREA_PAD_R 10 -#define CALL_QP_TEXT_RECT_DURING_X0 RECT_QP_W(BTN_OFFSET_LAST_W) -#define CALL_QP_TEXT_RECT_DURING_X1 RECT_QT_BTN_X0(3) - -#define CALL_QP_CONTACT_IMAGE_X0 RECT_QP_W(BTN_OFFSET_LAST_W) -#define CALL_QP_CONTACT_IMAGE_Y0 RECT_QP_H(TEXT_OFFSET) -#define CALL_QP_CONTACT_IMAGE_X1 RECT_QP_W(BTN_OFFSET_LAST_W+IMAGE_SIZE) -#define CALL_QP_CONTACT_IMAGE_Y1 RECT_QP_H((QP_H-BTN_OFFSET_LAST_H)) - -#define CALL_QP_CONTACT_NAME_X0 0.0 -#define CALL_QP_CONTACT_NAME_Y0 0.0 -#define CALL_QP_CONTACT_NAME_X1 1.0 -#define CALL_QP_CONTACT_NAME_Y1 (TEXT_NAME_SIZE/TEXT_SIZE) - -#define CALL_QP_TIMER_X0 0.0 -#define CALL_QP_TIMER_Y0 (TEXT_NAME_SIZE/TEXT_SIZE) -#define CALL_QP_TIMER_X1 1.0 -#define CALL_QP_TIMER_Y1 1.0 +#define QP_CALL_NAME_TXT_H 55 +#define QP_TIMER_TXT_H 43 styles { style { @@ -67,14 +46,25 @@ styles { } } -#define SWALLOW_BUTTON(part_name, x0, x1, inco, duri, out, resume) \ +#define QP_SWALLOW_BTN_WITH_PAD_L(part_name, _from_right_part_name, inco, duri, out, resume) \ part { name: part_name; \ type: SWALLOW; \ scale: 1; \ description { \ state: "default" 0.0; \ - rel1 { relative: RECT_QT_BTN_X0(x0) RECT_QP_H(BTN_OFFSET); to: "background";} \ - rel2 { relative: RECT_QT_BTN_X1(x1) RECT_QP_H((QP_H - BTN_OFFSET_LAST_H)); to: "background";} \ + rel1 { \ + relative: 0.0 1.0; \ + to_x: _from_right_part_name; \ + to_y: "pad.btn.top"; \ + } \ + rel2 { \ + relative: 0.0 1.0; \ + to_x: _from_right_part_name; \ + to_y: "pad.btn.top"; \ + } \ + min: QP_BTN_SIZE; \ + max: QP_BTN_SIZE; \ + align: 1.0 0.0; \ } \ description { \ state: "incoming" 0.0; \ @@ -97,26 +87,118 @@ styles { visible: resume; \ } \ } \ + part { name: "pad."part_name".left"; \ + type: SPACER; \ + scale: 1; \ + description { state: "default" 0.0; \ + fixed: 1 0; \ + min: QP_BTN_GAP 0; \ + max: QP_BTN_GAP -1; \ + rel1 { relative: 0 0; to_x: part_name; } \ + rel2 { relative: 0 1; to_x: part_name; } \ + align: 1 0.5; \ + } \ + } \ group { name: "quickpanel"; - parts { - part { name: "background"; - type: RECT; + part { name: "bg"; + type: SPACER; + scale: 1; description { state: "default" 0.0; - color: COLOR_BG_ALPHA; + min: 0 QP_H; + fixed: 0 1; + } + } + part { name: "pad.left"; + type: SPACER; + scale: 1; + description { + min: QP_BG_PAD_L 0; + fixed: 1 0; + rel2.relative: 0.0 1.0; + align: 0.0 0.0; + } + } + part { name: "pad.right"; + type: SPACER; + scale: 1; + description { + min: QP_BG_PAD_R 0; + fixed: 1 0; + rel1.relative: 1.0 0.0; + align: 1.0 0.0; + } + } + part { name: "pad.bottom"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + min: 0 QP_BG_PAD_B; + fixed: 0 1; + rel1.relative: 0.0 1.0; + } + } + part { name: "pad.contact.image.top"; + type: SPACER; + scale: 1; + description { + min: 0 QP_CONTACT_ICON_PAD_T; + fixed: 0 1; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + } + } + part { name: "pad.btn.top"; + type: SPACER; + scale: 1; + description { + min: 0 QP_BTN_PAD_T; + fixed: 0 1; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + } + } + part { name: "pad.txt.area.top"; + type: SPACER; + scale: 1; + description { + min: 0 QP_TEXT_AREA_PAD_T; + fixed: 0 1; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + } + } + part { name: "pad.contact.image.right"; + type: SPACER; + scale: 1; + description { + fixed: 1 0; + min: QP_CONTACT_ICON_PAD_R 0; + max: QP_CONTACT_ICON_PAD_R -1; + rel1 { relative: 1 0; to_x: "caller_id"; } + rel2 { relative: 1 1; to_x: "caller_id"; } + align: 0 0.5; } } - part { name: "txt_area"; type: SPACER; scale: 1; description { state: "default" 0.0; - rel1 { relative: CALL_QP_TEXT_RECT_INCO_X0 CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: CALL_QP_TEXT_RECT_INCO_X1 CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} + rel1 { + relative: 1.0 1.0; + to_x: "pad.contact.image.right"; + to_y: "pad.txt.area.top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad.txt.area.right"; + to_y: "pad.bottom"; + } } description { state: "incoming" 0.0; @@ -125,28 +207,66 @@ group { description { state: "during" 0.0; inherit: "default" 0.0; - rel1 { relative: CALL_QP_TEXT_RECT_DURING_X0 CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: CALL_QP_TEXT_RECT_DURING_X1 CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} + rel1 { + relative: 1.0 1.0; + to_x: "pad.left"; + to_y: "pad.txt.area.top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad.txt.area.right"; + to_y: "pad.bottom"; + } } description { state: "resume" 0.0; inherit: "default" 0.0; - rel1 { relative: CALL_QP_TEXT_RECT_DURING_X0 CALL_QP_TEXT_RECT_INCO_Y0; to: "background";} - rel2 { relative: CALL_QP_TEXT_RECT_DURING_X1 CALL_QP_TEXT_RECT_INCO_Y1; to: "background";} + rel1 { + relative: 1.0 1.0; + to_x: "pad.left"; + to_y: "pad.txt.area.top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad.txt.area.right"; + to_y: "pad.bottom"; + } } description { state: "outgoing" 0.0; inherit: "default" 0.0; } } - + part { name: "pad.txt.area.right"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + fixed: 1 0; + min: QP_TEXT_AREA_PAD_R 0; + max: QP_TEXT_AREA_PAD_R -1; + rel1 { relative: 0 0; to_x: "swallow.speaker_button"; } + rel2 { relative: 0 1; to_x: "swallow.speaker_button"; } + align: 1 0.5; + } + } part { name: "swallow.speaker_button"; type: SWALLOW; scale: 1; description { state: "default" 0.0; - rel1 { relative: RECT_QT_BTN_X0(2) RECT_QP_H(BTN_OFFSET); to: "background";} - rel2 { relative: RECT_QT_BTN_X1(1) RECT_QP_H((QP_H - BTN_OFFSET_LAST_H)); to: "background";} + rel1 { + relative: 0.0 1.0; + to_x: "pad.swallow.end_button.left"; + to_y: "pad.btn.top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "pad.swallow.end_button.left"; + to_y: "pad.btn.top"; + } + min: QP_BTN_SIZE; + max: QP_BTN_SIZE; + align: 1.0 0.0; } description { state: "incoming" 0.0; @@ -155,7 +275,19 @@ group { } description { state: "during" 0.0; - inherit: "default" 0.0; + rel1 { + relative: 0.0 1.0; + to_x: "pad.swallow.mute_button.left"; + to_y: "pad.btn.top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "pad.swallow.mute_button.left"; + to_y: "pad.btn.top"; + } + min: QP_BTN_SIZE; + max: QP_BTN_SIZE; + align: 1.0 0.0; visible: 1; } description { @@ -165,21 +297,38 @@ group { } description { state: "resume" 0.0; - inherit: "default" 0.0; - rel1 { relative: RECT_QT_BTN_X0(3) RECT_QP_H(BTN_OFFSET); to: "background";} - rel2 { relative: RECT_QT_BTN_X1(2) RECT_QP_H((QP_H - BTN_OFFSET_LAST_H)); to: "background";} + rel1 { + relative: 0.0 1.0; + to_x: "pad.swallow.resume_button.left"; + to_y: "pad.btn.top"; + } + rel2 { + relative: 0.0 1.0; + to_x: "pad.swallow.resume_button.left"; + to_y: "pad.btn.top"; + } + min: QP_BTN_SIZE; + max: QP_BTN_SIZE; + align: 1.0 0.0; visible: 1; } } - part { name: "txt_call_name"; type: TEXTBLOCK; scale: 1; description { state: "default" 0.0; - rel1 { relative: CALL_QP_CONTACT_NAME_X0 CALL_QP_CONTACT_NAME_Y0; to: "txt_area";} - rel2 { relative: CALL_QP_CONTACT_NAME_X1 CALL_QP_CONTACT_NAME_Y1; to: "txt_area";} - align: 0.0 0.5; + rel1 { + relative: 0.0 0.0; + to: "txt_area"; + } + rel2 { + relative: 1.0 0.0; + to: "txt_area"; + } + min: 0 QP_CALL_NAME_TXT_H; + fixed: 0 1; + align: 0.0 0.0; text { ellipsis: 0.0; fit: 0 1; @@ -190,15 +339,22 @@ group { color_class: "ATO005QP"; } } - part { name: "txt_timer"; type: TEXTBLOCK; scale: 1; description { state: "default" 0.0; - rel1 { relative: CALL_QP_TIMER_X0 CALL_QP_TIMER_Y0; to: "txt_area";} - rel2 { relative: CALL_QP_TIMER_X1 CALL_QP_TIMER_Y1; to: "txt_area";} - fixed: 1 1; + rel1 { + relative: 0.0 1.0; + to: "txt_call_name"; + } + rel2 { + relative: 1.0 1.0; + to: "txt_call_name"; + } + min: 0 QP_TIMER_TXT_H; + fixed: 0 1; + align: 0.0 0.0; text { align: 0.0 0.5; ellipsis: 1.0; @@ -208,15 +364,20 @@ group { color_class: "ATO006QP"; } } - part { name: "caller_id"; type: SWALLOW; scale: 1; description { - fixed: 1 1; state: "default" 0.0; - rel1 { relative: CALL_QP_CONTACT_IMAGE_X0 CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: CALL_QP_CONTACT_IMAGE_X1 CALL_QP_CONTACT_IMAGE_Y1;} + min: QP_CONTACT_ICON_SIZE; + max: QP_CONTACT_ICON_SIZE; + fixed: 1 1; + align: 0.0 0.0; + rel1 { + relative: 1.0 1.0; + to_x: "pad.left"; + to_y: "pad.contact.image.top"; + } } description { state: "incoming" 0.0; @@ -249,15 +410,14 @@ group { visible: 0; } } - part { name: "caller_id_mask"; type: IMAGE; scale: 1; description { visible: 0; fixed: 1 1; - rel1 { relative: CALL_QP_CONTACT_IMAGE_X0 CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: CALL_QP_CONTACT_IMAGE_X1 CALL_QP_CONTACT_IMAGE_Y1;} + rel1 { relative: 0.0 0.0; to: "caller_id"; } + rel2 { relative: 1.0 1.0; to: "caller_id"; } image { normal: IMG_SRC_DIR/"call_photo_id_mask.png"; } @@ -294,15 +454,14 @@ group { visible: 0; } } - part { name: "caller_id_img"; type: IMAGE; scale: 1; description { visible: 0; fixed: 1 1; - rel1 { relative: CALL_QP_CONTACT_IMAGE_X0 CALL_QP_CONTACT_IMAGE_Y0;} - rel2 { relative: CALL_QP_CONTACT_IMAGE_X1 CALL_QP_CONTACT_IMAGE_Y1;} + rel1 { relative: 0.0 0.0; to: "caller_id"; } + rel2 { relative: 1.0 1.0; to: "caller_id"; } image { normal: IMG_SRC_DIR/"call_photo_id.png"; } @@ -340,10 +499,10 @@ group { visible: 0; } } - SWALLOW_BUTTON("swallow.mute_button", 3, 2, 0, 1, 0, 0); - SWALLOW_BUTTON("swallow.resume_button", 2, 1, 0, 0, 0, 1); - SWALLOW_BUTTON("swallow.call_button", 2, 1, 1, 0, 0, 0); - SWALLOW_BUTTON("swallow.end_button", 1, 0, 1, 1, 1, 0); + QP_SWALLOW_BTN_WITH_PAD_L("swallow.mute_button", "pad.swallow.end_button.left", 0, 1, 0, 0); + QP_SWALLOW_BTN_WITH_PAD_L("swallow.resume_button", "pad.swallow.end_button.left", 0, 0, 0, 1); + QP_SWALLOW_BTN_WITH_PAD_L("swallow.call_button", "pad.swallow.end_button.left", 1, 0, 0, 0); + QP_SWALLOW_BTN_WITH_PAD_L("swallow.end_button", "pad.right", 1, 1, 1, 0); } programs{ program { diff --git a/src/callui-common.c b/src/callui-common.c index fb5651b..1dead6c 100755 --- a/src/callui-common.c +++ b/src/callui-common.c @@ -29,10 +29,7 @@ #include #include #include - -#ifndef USE_X11_API #include -#endif #include "callui-common.h" #include "callui-view-elements.h" @@ -341,28 +338,15 @@ void _callui_common_win_set_noti_type(void *appdata, int bwin_noti) dbg("_callui_common_win_set_noti_type"); callui_app_data_t *ad = (callui_app_data_t *)appdata; -#ifdef USE_X11_API - Ecore_X_Window win = elm_win_xwindow_get(ad->win); -#else Ecore_Wl_Window *win = elm_win_wl_window_get(ad->win); -#endif - if (bwin_noti == EINA_FALSE) { dbg("window type: NORMAL"); /* Set Normal window */ -#ifdef USE_X11_API - ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL); -#else ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_TOPLEVEL); -#endif } else { dbg("window type: NOTI-HIGH"); /* Set Notification window */ -#ifdef USE_X11_API - ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION); -#else ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_NOTIFICATION); -#endif /* Set Notification's priority to LEVEL_HIGH */ efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_TOP); } diff --git a/src/callui-view-quickpanel.c b/src/callui-view-quickpanel.c index c2697dc..e88537a 100755 --- a/src/callui-view-quickpanel.c +++ b/src/callui-view-quickpanel.c @@ -15,20 +15,21 @@ * */ +#include +#include +#include +#include + #include "callui.h" #include "callui-view-elements.h" #include "callui-view-quickpanel.h" -#include -#include #include "callui-view-layout.h" #include "callui-common.h" -#include -#include #define VIEW_QUICKPANEL_LAYOUT_ID "QUICKPANELVIEW" -#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL #define TXT_TIMER_BUF_LEN 26 #define CALL_NUMBER_ONE 1 +#define QP_WIN_H 172 struct callui_view_qp_priv { Evas_Object *caller_id; @@ -586,16 +587,25 @@ static int __callui_view_qp_oncreate(call_view_data_t *view_data, unsigned int p if (!view_data->layout) { ad->win_quickpanel = __callui_view_qp_create_window(); if (ad->win_quickpanel == NULL) { - dbg("ERROR"); + err("__callui_view_qp_create_window FAILED!"); return -1; } + priv->rotate_angle = elm_win_rotation_get(ad->win_quickpanel); dbg("current rotate angle(%d)", priv->rotate_angle); view_data->layout = __callui_view_qp_create_layout_main(ad->win_quickpanel); if (view_data->layout == NULL) { - dbg("ERROR"); + err("__callui_view_qp_create_layout_main FAILED!"); return -1; } + ad->quickpanel_layout = __callui_view_qp_create_contents(view_data, GRP_QUICKPANEL); + if (ad->quickpanel_layout == NULL) { + err("__callui_view_qp_create_contents FAILED!"); + return -1; + } + elm_object_part_content_set(view_data->layout, "elm.swallow.content", ad->quickpanel_layout); + evas_object_name_set(ad->quickpanel_layout, VIEW_QUICKPANEL_LAYOUT_ID); + evas_object_event_callback_add(ad->quickpanel_layout, EVAS_CALLBACK_MOUSE_UP, __callui_qp_launch_top_view_cb, ad); } //TODO Ecore x is not supported. Need to implement handling of rotation change events from qp @@ -628,29 +638,15 @@ static int __callui_view_qp_onshow(call_view_data_t *view_data, void *appdata) dbg("quickpanel view show!!"); callui_app_data_t *ad = _callui_get_app_data(); callui_view_qp_priv_t *priv = (callui_view_qp_priv_t *)view_data->priv; - if (ad->quickpanel_layout) { - evas_object_event_callback_del(ad->quickpanel_layout, EVAS_CALLBACK_MOUSE_UP, __callui_qp_launch_top_view_cb); - evas_object_del(ad->quickpanel_layout); - ad->quickpanel_layout = NULL; - } if (priv->rotate_angle == 0 || priv->rotate_angle == 180) { dbg("portrait mode layout"); - ad->landscape = false; evas_object_resize(ad->win_quickpanel, ELM_SCALE_SIZE(MAIN_SCREEN_W), ELM_SCALE_SIZE(QP_WIN_H)); - ad->quickpanel_layout = __callui_view_qp_create_contents(view_data, GRP_QUICKPANEL); } else if (priv->rotate_angle == 90 || priv->rotate_angle == 270) { dbg("landscape mode layout"); - ad->landscape = true; evas_object_resize(ad->win_quickpanel, ELM_SCALE_SIZE(MAIN_SCREEN_H), ELM_SCALE_SIZE(QP_WIN_H)); - ad->quickpanel_layout = __callui_view_qp_create_contents(view_data, GRP_QUICKPANEL_LS); } - elm_object_part_content_set(view_data->layout, "elm.swallow.content", ad->quickpanel_layout); - evas_object_name_set(ad->quickpanel_layout, VIEW_QUICKPANEL_LAYOUT_ID); - dbg("[========== QUICKPANEL:ad->quickpanel_layout Addr : [%p] ==========]", ad->quickpanel_layout); - evas_object_event_callback_add(ad->quickpanel_layout, EVAS_CALLBACK_MOUSE_UP, __callui_qp_launch_top_view_cb, ad); - __callui_view_qp_draw_screen(ad->quickpanel_layout, ad); evas_object_show(ad->win_quickpanel); evas_object_show(ad->quickpanel_layout); @@ -687,6 +683,7 @@ static int __callui_view_qp_ondestroy(call_view_data_t *view_data) } if (ad->quickpanel_layout) { + evas_object_event_callback_del_full(ad->quickpanel_layout, EVAS_CALLBACK_MOUSE_UP, __callui_qp_launch_top_view_cb, ad); evas_object_del(ad->quickpanel_layout); ad->quickpanel_layout = NULL; } diff --git a/src/callui.c b/src/callui.c index bf72340..1d7562d 100755 --- a/src/callui.c +++ b/src/callui.c @@ -468,6 +468,9 @@ static bool _callui_app_create(void *data) callui_app_data_t *ad = data; int ret = 0; + /* Set base scale */ + elm_app_base_scale_set(2.6); + _callui_common_dvc_control_lcd_state(LCD_OFF_SLEEP_LOCK); elm_config_preferred_engine_set("opengl_x11"); @@ -490,9 +493,6 @@ static bool _callui_app_create_layout(void *data) { callui_app_data_t *ad = data; - /* Set base scale */ - elm_app_base_scale_set(2.6); - ad->win = __callui_create_main_win(ad); if (ad->win == NULL) { err("__callui_create_main_win failed"); -- 2.7.4