From 234a947d491fa4e282c3b4d78eb96729d65cf329 Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Thu, 18 May 2017 13:48:52 +0300 Subject: [PATCH] TizenRefApp-8522 [Call UI] Refactor edc files structure Change-Id: Ia9d28fb8beedc03de389cc2a019a246ad7bba21a --- edc/{layouts.edc => accept_reject.edc} | 108 +------------------------ edc/indicator.edc | 83 +++++++++++++++++++ edc/main_ly.edc | 46 +++++++++++ res/edje/theme.edc | 9 +-- 4 files changed, 132 insertions(+), 114 deletions(-) rename edc/{layouts.edc => accept_reject.edc} (53%) create mode 100644 edc/main_ly.edc diff --git a/edc/layouts.edc b/edc/accept_reject.edc similarity index 53% rename from edc/layouts.edc rename to edc/accept_reject.edc index 99443fc..b590692 100644 --- a/edc/layouts.edc +++ b/edc/accept_reject.edc @@ -20,67 +20,6 @@ #define CU_BTN_HIDE_ANIM_TIME 0.2 -#define CU_SWL_CONN_COORD_X 104 -#define CU_SWL_CONN_COORD_Y 31 - -#define CU_SWL_RSSI_COORD_X 135 -#define CU_SWL_RSSI_COORD_Y 20 - -#define CU_SWL_BATT_COORD_X 169 -#define CU_SWL_BATT_COORD_Y 14 - -#define CU_SWL_SIM_COORD_X 201 -#define CU_SWL_SIM_COORD_Y 20 - -#define CU_SWL_HD_CALL_COORD_X 232 -#define CU_SWL_HD_CALL_COORD_Y 31 - -#define CU_SWL_CONN_REL1 CU_REL_W(CU_SWL_CONN_COORD_X) CU_REL_H(CU_SWL_CONN_COORD_Y) -#define CU_SWL_CONN_REL2 CU_REL_W((CU_SWL_CONN_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_CONN_COORD_Y+CU_INDI_ICON_H)) - -#define CU_SWL_RSSI_REL1 CU_REL_W(CU_SWL_RSSI_COORD_X) CU_REL_H(CU_SWL_RSSI_COORD_Y) -#define CU_SWL_RSSI_REL2 CU_REL_W((CU_SWL_RSSI_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_RSSI_COORD_Y+CU_INDI_ICON_H)) - -#define CU_SWL_BATTERY_REL1 CU_REL_W(CU_SWL_BATT_COORD_X) CU_REL_H(CU_SWL_BATT_COORD_Y) -#define CU_SWL_BATTERY_REL2 CU_REL_W((CU_SWL_BATT_COORD_X+CU_BATT_ICON_W)) CU_REL_H((CU_SWL_BATT_COORD_Y+CU_BATT_ICON_H)) - -#define CU_SWL_SIM_REL1 CU_REL_W(CU_SWL_SIM_COORD_X) CU_REL_H(CU_SWL_SIM_COORD_Y) -#define CU_SWL_SIM_REL2 CU_REL_W((CU_SWL_SIM_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_SIM_COORD_Y+CU_INDI_ICON_H)) - -#define CU_SWL_HD_CALL_REL1 CU_REL_W(CU_SWL_HD_CALL_COORD_X) CU_REL_H(CU_SWL_HD_CALL_COORD_Y) -#define CU_SWL_HD_CALL_REL2 CU_REL_W((CU_SWL_HD_CALL_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_HD_CALL_COORD_Y+CU_INDI_ICON_H)) - - -group { "elm/layout/callui/main"; - parts { - swallow { "swl.call_info"; - scale; - desc { "default"; - } - } - swallow { "swl.indicator"; - scale; - desc { "default"; - } - } - swallow { "swl.rm" - scale; - desc { "default"; - } - } - swallow { "swl.accept_reject"; - scale; - desc { "default"; - } - } - swallow { "swl.overlay"; - scale; - desc { "default"; - } - } - } -} - group { "elm/layout/callui/accept_reject"; parts { spacer { "spacer.left"; @@ -182,49 +121,4 @@ group { "elm/layout/callui/accept_reject"; targets: "spacer.right" "spacer.left"; } } -} - -group { "elm/layout/callui/indicator"; - parts { - spacer { "bg"; - scale; - desc { "default"; - } - } - swallow { "swl.connection"; - scale; - desc { "default"; - rel1 { relative: CU_SWL_CONN_REL1; to: "bg"; } - rel2 { relative: CU_SWL_CONN_REL2; to: "bg"; } - } - } - swallow { "swl.rssi"; - scale; - desc { "default"; - rel1 { relative: CU_SWL_RSSI_REL1; to: "bg"; } - rel2 { relative: CU_SWL_RSSI_REL2; to: "bg"; } - } - } - swallow { "swl.battery"; - scale; - desc { "default"; - rel1 { relative: CU_SWL_BATTERY_REL1; to: "bg"; } - rel2 { relative: CU_SWL_BATTERY_REL2; to: "bg"; } - } - } - swallow { "swl.sim"; - scale; - desc { "default"; - rel1 { relative: CU_SWL_SIM_REL1; to: "bg"; } - rel2 { relative: CU_SWL_SIM_REL2; to: "bg"; } - } - } - swallow { "swl.hd_voice"; - scale; - desc { "default"; - rel1 { relative: CU_SWL_HD_CALL_REL1; to: "bg"; } - rel2 { relative: CU_SWL_HD_CALL_REL2; to: "bg"; } - } - } - } -} +} \ No newline at end of file diff --git a/edc/indicator.edc b/edc/indicator.edc index 140b162..9fa4127 100644 --- a/edc/indicator.edc +++ b/edc/indicator.edc @@ -20,6 +20,89 @@ #define CU_RSSI_IMAGE_DIR CU_INDI_ICONS_DIR"/4level" #define CU_BATT_IMAGE_DIR CU_INDI_ICONS_DIR"/Battery" +#define CU_BATT_ICON_H 32 +#define CU_BATT_ICON_W 22 + +#define CU_INDI_ICON_H 26 +#define CU_INDI_ICON_W 24 + +#define CU_SWL_CONN_COORD_X 104 +#define CU_SWL_CONN_COORD_Y 31 + +#define CU_SWL_RSSI_COORD_X 135 +#define CU_SWL_RSSI_COORD_Y 20 + +#define CU_SWL_BATT_COORD_X 169 +#define CU_SWL_BATT_COORD_Y 14 + +#define CU_SWL_SIM_COORD_X 201 +#define CU_SWL_SIM_COORD_Y 20 + +#define CU_SWL_HD_CALL_COORD_X 232 +#define CU_SWL_HD_CALL_COORD_Y 31 + +#define CU_SWL_CONN_REL1 CU_REL_W(CU_SWL_CONN_COORD_X) CU_REL_H(CU_SWL_CONN_COORD_Y) +#define CU_SWL_CONN_REL2 CU_REL_W((CU_SWL_CONN_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_CONN_COORD_Y+CU_INDI_ICON_H)) + +#define CU_SWL_RSSI_REL1 CU_REL_W(CU_SWL_RSSI_COORD_X) CU_REL_H(CU_SWL_RSSI_COORD_Y) +#define CU_SWL_RSSI_REL2 CU_REL_W((CU_SWL_RSSI_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_RSSI_COORD_Y+CU_INDI_ICON_H)) + +#define CU_SWL_BATTERY_REL1 CU_REL_W(CU_SWL_BATT_COORD_X) CU_REL_H(CU_SWL_BATT_COORD_Y) +#define CU_SWL_BATTERY_REL2 CU_REL_W((CU_SWL_BATT_COORD_X+CU_BATT_ICON_W)) CU_REL_H((CU_SWL_BATT_COORD_Y+CU_BATT_ICON_H)) + +#define CU_SWL_SIM_REL1 CU_REL_W(CU_SWL_SIM_COORD_X) CU_REL_H(CU_SWL_SIM_COORD_Y) +#define CU_SWL_SIM_REL2 CU_REL_W((CU_SWL_SIM_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_SIM_COORD_Y+CU_INDI_ICON_H)) + +#define CU_SWL_HD_CALL_REL1 CU_REL_W(CU_SWL_HD_CALL_COORD_X) CU_REL_H(CU_SWL_HD_CALL_COORD_Y) +#define CU_SWL_HD_CALL_REL2 CU_REL_W((CU_SWL_HD_CALL_COORD_X+CU_INDI_ICON_W)) CU_REL_H((CU_SWL_HD_CALL_COORD_Y+CU_INDI_ICON_H)) + +// Indicator main layout + +group { "elm/layout/callui/indicator"; + parts { + spacer { "bg"; + scale; + desc { "default"; + } + } + swallow { "swl.connection"; + scale; + desc { "default"; + rel1 { relative: CU_SWL_CONN_REL1; to: "bg"; } + rel2 { relative: CU_SWL_CONN_REL2; to: "bg"; } + } + } + swallow { "swl.rssi"; + scale; + desc { "default"; + rel1 { relative: CU_SWL_RSSI_REL1; to: "bg"; } + rel2 { relative: CU_SWL_RSSI_REL2; to: "bg"; } + } + } + swallow { "swl.battery"; + scale; + desc { "default"; + rel1 { relative: CU_SWL_BATTERY_REL1; to: "bg"; } + rel2 { relative: CU_SWL_BATTERY_REL2; to: "bg"; } + } + } + swallow { "swl.sim"; + scale; + desc { "default"; + rel1 { relative: CU_SWL_SIM_REL1; to: "bg"; } + rel2 { relative: CU_SWL_SIM_REL2; to: "bg"; } + } + } + swallow { "swl.hd_voice"; + scale; + desc { "default"; + rel1 { relative: CU_SWL_HD_CALL_REL1; to: "bg"; } + rel2 { relative: CU_SWL_HD_CALL_REL2; to: "bg"; } + } + } + } +} + // Connection #define CU_DESC_CONN_IMAGE(_value) \ diff --git a/edc/main_ly.edc b/edc/main_ly.edc new file mode 100644 index 0000000..d39eeae --- /dev/null +++ b/edc/main_ly.edc @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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. + */ + +group { "elm/layout/callui/main"; + parts { + swallow { "swl.call_info"; + scale; + desc { "default"; + } + } + swallow { "swl.indicator"; + scale; + desc { "default"; + } + } + swallow { "swl.rm" + scale; + desc { "default"; + } + } + swallow { "swl.accept_reject"; + scale; + desc { "default"; + } + } + swallow { "swl.overlay"; + scale; + desc { "default"; + } + } + } +} + diff --git a/res/edje/theme.edc b/res/edje/theme.edc index 33a4543..75b394d 100644 --- a/res/edje/theme.edc +++ b/res/edje/theme.edc @@ -22,12 +22,6 @@ #define CU_REL_W(val) (val/CU_WIN_W) #define CU_REL_H(val) (val/CU_WIN_H) -#define CU_BATT_ICON_H 32 -#define CU_BATT_ICON_W 22 - -#define CU_INDI_ICON_H 26 -#define CU_INDI_ICON_W 24 - collections { base_scale: 1.3; @@ -40,9 +34,10 @@ collections { } #include "../../edc/color_classes.edc" - #include "../../edc/layouts.edc" #include "../../edc/buttons.edc" + #include "../../edc/main_ly.edc" + #include "../../edc/accept_reject.edc" #include "../../edc/indicator.edc" #include "../../edc/call_info.edc" #include "../../edc/reject_msg.edc" -- 2.34.1