From e06f45a2a9bce6ed9803581418535ed31ecb38fb Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Fri, 2 Jun 2017 09:22:34 +0300 Subject: [PATCH] TizenRefApp-8634 [Call UI] Fix genlist circle scroller in Reject Message panel Change-Id: Ifc559df289bac4c6a7b42bfd31cb2d2e64f5a639 --- edc/reject_msg.edc | 13 +++++--- src/presenters/CallInfoPresenter.cpp | 32 +++++++++--------- src/presenters/CallStatus.cpp | 18 +++++----- src/presenters/RejectMsgPresenter.cpp | 48 ++++++++++++++++----------- src/view/Slider.cpp | 1 - tizen-manifest.xml | 1 + 6 files changed, 62 insertions(+), 51 deletions(-) diff --git a/edc/reject_msg.edc b/edc/reject_msg.edc index 4e1a4b0..cc88b05 100644 --- a/edc/reject_msg.edc +++ b/edc/reject_msg.edc @@ -95,21 +95,24 @@ group { "elm/layout/callui/rm_panel_content"; images.image: "b_ic_press_full_circle_bg.png" COMP; parts { image { "cid_clipper"; + scale; precise_is_inside: 1; desc { "default"; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } image.normal: "b_ic_press_full_circle_bg.png"; aspect: 1.0 1.0; aspect_preference: SOURCE; } } - swallow { "elm.swallow.content"; + swallow { "swl.content"; + scale; + clip_to: "cid_clipper"; + desc { "default"; + } + } + swallow { "swl.scroller"; scale; clip_to: "cid_clipper"; desc { "default"; - min: CU_WIN_W CU_WIN_H; - max: CU_WIN_W CU_WIN_H; } } } diff --git a/src/presenters/CallInfoPresenter.cpp b/src/presenters/CallInfoPresenter.cpp index 17ac196..1e49f04 100644 --- a/src/presenters/CallInfoPresenter.cpp +++ b/src/presenters/CallInfoPresenter.cpp @@ -45,30 +45,30 @@ namespace callui { namespace { namespace impl { constexpr ElmStyle STYLE_SLIDING_LABEL {"slide_roll"}; - constexpr EdjeSignal SIGN_EMERGENCY_MODE{"emergency"}; + constexpr EdjeSignal SIGN_EMERGENCY_MODE {"emergency"}; - constexpr EdjeSignal SIGN_RESET{"reset"}; + constexpr EdjeSignal SIGN_RESET {"reset"}; - constexpr EdjeSignal SIGN_CALLER_ID_DISABLE{"caller_id_disable"}; - constexpr EdjeSignal SIGN_CALLER_ID_ENABLE{"caller_id_enable"}; + constexpr EdjeSignal SIGN_CALLER_ID_DISABLE {"caller_id_disable"}; + constexpr EdjeSignal SIGN_CALLER_ID_ENABLE {"caller_id_enable"}; - constexpr EdjeSignal SIGN_INCOM_1LINE{"incom_1line"}; - constexpr EdjeSignal SIGN_INCOM_2LINE{"incom_2line"}; + constexpr EdjeSignal SIGN_INCOM_1LINE {"incom_1line"}; + constexpr EdjeSignal SIGN_INCOM_2LINE {"incom_2line"}; - constexpr EdjeSignal SIGN_1LINE{"1line"}; - constexpr EdjeSignal SIGN_1LINE_2TXT{"1line_2text"}; - constexpr EdjeSignal SIGN_2LINE{"2line"}; - constexpr EdjeSignal SIGN_2LINE_2TXT{"2line_2text"}; + constexpr EdjeSignal SIGN_1LINE {"1line"}; + constexpr EdjeSignal SIGN_1LINE_2TXT {"1line_2text"}; + constexpr EdjeSignal SIGN_2LINE {"2line"}; + constexpr EdjeSignal SIGN_2LINE_2TXT {"2line_2text"}; - constexpr EdjeSignalSrc SRC_TOP_PAD{"top_padding"}; - constexpr EdjeSignalSrc SRC_TXT_1LINE{"text_1line"}; + constexpr EdjeSignalSrc SRC_TOP_PAD {"top_padding"}; + constexpr EdjeSignalSrc SRC_TXT_1LINE {"text_1line"}; - constexpr EdjeSignalSrc SRC_CALLER_ID{"caller_id"}; + constexpr EdjeSignalSrc SRC_CALLER_ID {"caller_id"}; - constexpr EdjePart PART_TXT_MAIN{"text_1line"}; + constexpr EdjePart PART_TXT_MAIN {"text_1line"}; - constexpr EdjePart PART_SWL_CALLER_ID{"caller_id"}; - constexpr EdjePart PART_SWL_2LINE{"text_2line"}; + constexpr EdjePart PART_SWL_CALLER_ID {"caller_id"}; + constexpr EdjePart PART_SWL_2LINE {"text_2line"}; const TString STR_LABEL_CALLER_ID_ENABLE{ "%s"}; diff --git a/src/presenters/CallStatus.cpp b/src/presenters/CallStatus.cpp index a0f7bef..d1c16c5 100644 --- a/src/presenters/CallStatus.cpp +++ b/src/presenters/CallStatus.cpp @@ -26,16 +26,16 @@ namespace callui { namespace { namespace impl { using namespace ucl; constexpr double CALL_DURATION_TIMER_INTERVAL = 0.1; - constexpr double BLINKING_TIMER_INTERVAL = 0.5; - constexpr int BLINKING_MAX_COUNT = 5; + constexpr double END_CALL_BLINKING_TIMER_INTERVAL = 0.5; + constexpr int END_CALL_BLINKING_MAX_COUNT = 5; - constexpr EdjePart PART_TXT_TEXT_INFO{"text_info"}; + constexpr EdjePart PART_TXT_TEXT_INFO {"text_info"}; - constexpr EdjeSignal SIGN_DOT_RTL{"default:RTL"}; - constexpr EdjeSignal SIGN_DOT_LTR{"default:LTR"}; - constexpr EdjeSignal SIGN_RESET{"reset"}; + constexpr EdjeSignal SIGN_DOT_RTL {"default:RTL"}; + constexpr EdjeSignal SIGN_DOT_LTR {"default:LTR"}; + constexpr EdjeSignal SIGN_RESET {"reset"}; - constexpr EdjeSignalSrc SIGN_SRC_DOT{"dot"}; + constexpr EdjeSignalSrc SIGN_SRC_DOT {"dot"}; }}} @@ -209,7 +209,7 @@ namespace callui { m_blinkCount++; - if (m_blinkCount == impl::BLINKING_MAX_COUNT) { + if (m_blinkCount == impl::END_CALL_BLINKING_MAX_COUNT) { m_ly->setText(STR_CALL_ENDED, impl::PART_TXT_TEXT_INFO); m_timer = nullptr; return ECORE_CALLBACK_CANCEL; @@ -226,7 +226,7 @@ namespace callui { m_duration = m_info->getDuration(); - m_timer = ecore_timer_add(impl::BLINKING_TIMER_INTERVAL, + m_timer = ecore_timer_add(impl::END_CALL_BLINKING_TIMER_INTERVAL, CALLBACK_B(CallStatus::onBlinkingTimerCb), this); if (!m_timer) { LOG_RETURN(RES_FAIL, "m_timer is NULL"); diff --git a/src/presenters/RejectMsgPresenter.cpp b/src/presenters/RejectMsgPresenter.cpp index 63e224a..1395274 100644 --- a/src/presenters/RejectMsgPresenter.cpp +++ b/src/presenters/RejectMsgPresenter.cpp @@ -34,11 +34,13 @@ namespace callui { namespace { namespace impl { constexpr LayoutTheme LAYOUT_RM_PANEL_CONTENT {"layout", "callui", "rm_panel_content"}; - constexpr EdjePart PART_SWL_RIGHT{"elm.swallow.right"}; - constexpr EdjePart PART_SWL_BG{"elm.swallow.bg"}; - constexpr EdjePart PART_SWL_CONTENT{"elm.swallow.content"}; + constexpr EdjePart PART_SWL_RIGHT {"elm.swallow.right"}; + constexpr EdjePart PART_SWL_BG {"elm.swallow.bg"}; - constexpr SmartEvent EVENT_SCROLL{"scroll"}; + constexpr EdjePart PART_SWL_CONTENT {"swl.content"}; + constexpr EdjePart PART_SWL_SCROLLER {"swl.scroller"}; + + constexpr SmartEvent EVENT_SCROLL {"scroll"}; }}} @@ -185,7 +187,7 @@ namespace callui { } eext_object_event_callback_add(m_widget->getEo(), EEXT_CALLBACK_BACK, - CALLBACK_A(RejectMsgPresenter::onBackKey), this); + CALLBACK_A(RejectMsgPresenter::onBackKey), this); return RES_OK; } @@ -244,7 +246,7 @@ namespace callui { WEAK_DELEGATE(RejectMsgPresenter::panelScrollCb, asWeak(*this))); - m_widget->setContent(m_panel->getEo(), impl::PART_SWL_RIGHT); + m_widget->setContent(*m_panel, impl::PART_SWL_RIGHT); return RES_OK; } @@ -273,15 +275,24 @@ namespace callui { if (!m_panelLy) { LOG_RETURN(RES_FAIL, "Layout::build failed!"); } - show(*m_panelLy); - - m_panel->setContent(m_panelLy->getEo()); + m_panel->setContent(*m_panelLy); return RES_OK; } Result RejectMsgPresenter::createGenlist() { + // Genlist scroller Layout + auto circlLy = Layout::Builder().build(*m_panelLy); + if (!circlLy) { + LOG_RETURN(RES_FAIL, "Layout::build failed!"); + } + // Circular surface + Eext_Circle_Surface *const circleSurf = eext_circle_surface_layout_add(*circlLy); + if (!circleSurf) { + LOG_RETURN(RES_FAIL, "eext_circle_surface_layout_add() failed!"); + } + // Genlist Evas_Object *const glEo = elm_genlist_add(*m_panelLy); if (!glEo) { LOG_RETURN(RES_FAIL, "elm_genlist_add() failed!"); @@ -291,13 +302,18 @@ namespace callui { elm_genlist_mode_set(glEo, ELM_LIST_COMPRESS); elm_genlist_homogeneous_set(glEo, EINA_TRUE); - elm_scroller_policy_set(glEo, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - m_genlist = makeShared(glEo); + m_circleEo = eext_circle_object_genlist_add(m_genlist->getEo(), circleSurf); + if (!m_circleEo) { + LOG_RETURN(RES_FAIL, "elm_genlist_add() failed!"); + } + eext_circle_object_genlist_scroller_policy_set(m_circleEo, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); FAIL_RETURN(fillGenlist(), "fillGenlist() failed!"); - m_panelLy->setContent(glEo, impl::PART_SWL_CONTENT); + m_panelLy->setContent(*circlLy, impl::PART_SWL_SCROLLER); + + m_panelLy->setContent(*m_genlist, impl::PART_SWL_CONTENT); return RES_OK; } @@ -451,14 +467,6 @@ namespace callui { void RejectMsgPresenter::activateRotary() { - if (!m_circleEo) { - elm_scroller_policy_set( - m_genlist->getEo(), ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); - m_circleEo = eext_circle_object_genlist_add( - m_genlist->getEo(), getCircleSurface(*m_genlist)); - eext_circle_object_genlist_scroller_policy_set( - m_circleEo, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); - } eext_rotary_object_event_activated_set(m_circleEo, EINA_TRUE); } diff --git a/src/view/Slider.cpp b/src/view/Slider.cpp index 34a4011..7d3219f 100644 --- a/src/view/Slider.cpp +++ b/src/view/Slider.cpp @@ -106,7 +106,6 @@ namespace callui { evas_object_size_hint_weight_set(m_slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - m_circleLy.setContent(m_slider); m_layout->setContent(m_circleLy, impl::PART_SWL_SLIDER); show(m_circleLy); show(m_slider); diff --git a/tizen-manifest.xml b/tizen-manifest.xml index d8c27cb..295e338 100644 --- a/tizen-manifest.xml +++ b/tizen-manifest.xml @@ -23,5 +23,6 @@ http://tizen.org/privilege/notification http://tizen.org/privilege/display http://tizen.org/privilege/message.read + http://tizen.org/privilege/keygrab -- 2.34.1