diff --git a/drape_frontend/animation/show_hide_animation.cpp b/drape_frontend/animation/show_hide_animation.cpp index 38366731bc..078f99a74a 100644 --- a/drape_frontend/animation/show_hide_animation.cpp +++ b/drape_frontend/animation/show_hide_animation.cpp @@ -58,7 +58,7 @@ void ShowHideAnimation::Show() } } -void ShowHideAnimation::ShowAnim() +void ShowHideAnimation::ShowAnimated() { RefreshInterpolator({ STATE_VISIBLE, STATE_SHOW_DIRECTION }, 1.0); } @@ -73,7 +73,7 @@ void ShowHideAnimation::Hide() } } -void ShowHideAnimation::HideAnim() +void ShowHideAnimation::HideAnimated() { RefreshInterpolator({ STATE_INVISIBLE, STATE_HIDE_DIRECTION }, 0.0); } diff --git a/drape_frontend/animation/show_hide_animation.hpp b/drape_frontend/animation/show_hide_animation.hpp index 39fe133c64..931c6a00a7 100644 --- a/drape_frontend/animation/show_hide_animation.hpp +++ b/drape_frontend/animation/show_hide_animation.hpp @@ -22,9 +22,9 @@ public: ~ShowHideAnimation(); void Show(); - void ShowAnim(); + void ShowAnimated(); void Hide(); - void HideAnim(); + void HideAnimated(); EState GetState() const; double GetT() const; bool IsFinished() const; diff --git a/drape_frontend/gui/compass.cpp b/drape_frontend/gui/compass.cpp index d6d10d0d60..4d580680df 100644 --- a/drape_frontend/gui/compass.cpp +++ b/drape_frontend/gui/compass.cpp @@ -29,6 +29,8 @@ namespace class CompassHandle : public TappableHandle { using TBase = TappableHandle; + double const VisibleStartAngle = my::DegToRad(5.0); + double const VisibleEndAngle = my::DegToRad(355.0); public: CompassHandle(m2::PointF const & pivot, m2::PointF const & size, Shape::TTapHandler const & tapHandler) @@ -49,17 +51,17 @@ namespace float angle = ang::AngleIn2PI(screen.GetAngle()); bool isVisiblePrev = IsVisible(); - bool isVisibleAngle = angle > my::DegToRad(5.0) && angle < my::DegToRad(355.0); + bool isVisibleAngle = angle > VisibleStartAngle && angle < VisibleEndAngle; bool isVisible = isVisibleAngle || (isVisiblePrev && DrapeGui::Instance().IsInUserAction()); if (isVisible) { - m_animation.ShowAnim(); + m_animation.ShowAnimated(); SetIsVisible(true); } else - m_animation.HideAnim(); + m_animation.HideAnimated(); if (IsVisible()) { diff --git a/drape_frontend/gui/ruler.cpp b/drape_frontend/gui/ruler.cpp index 970cda2097..196f163cec 100644 --- a/drape_frontend/gui/ruler.cpp +++ b/drape_frontend/gui/ruler.cpp @@ -63,7 +63,7 @@ public: bool isVisible = helper.IsVisible(screen); if (!isVisible) { - m_animation.HideAnim(); + m_animation.HideAnimated(); m_isVisibleAtEnd = false; } else @@ -73,12 +73,12 @@ public: m_isAppearing = !m_isAppearing; if (m_isAppearing) { - m_animation.ShowAnim(); + m_animation.ShowAnimated(); m_isVisibleAtEnd = true; } else { - m_animation.HideAnim(); + m_animation.HideAnimated(); m_isVisibleAtEnd = false; } } diff --git a/drape_frontend/selection_shape.cpp b/drape_frontend/selection_shape.cpp index 590a8c86b1..b9b55349a1 100644 --- a/drape_frontend/selection_shape.cpp +++ b/drape_frontend/selection_shape.cpp @@ -109,7 +109,7 @@ void SelectionShape::SetPosition(m2::PointD const & position) void SelectionShape::Show() { - m_animation.ShowAnim(); + m_animation.ShowAnimated(); } void SelectionShape::Hide()