From 8088d0b57f4263b640dda02ca3b97add662286f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 13 Nov 2018 17:26:12 +0100 Subject: [PATCH] Revert "[apps] OK icon in graphs is in the top right corner" This reverts commit 50c0b0b8a79ce62723c13aeafe36d1afc75ce5a5. --- apps/shared/curve_view.cpp | 6 +++++- apps/shared/curve_view.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/shared/curve_view.cpp b/apps/shared/curve_view.cpp index 29e21e178..563eeb13d 100644 --- a/apps/shared/curve_view.cpp +++ b/apps/shared/curve_view.cpp @@ -558,8 +558,12 @@ KDRect CurveView::bannerFrame() { KDRect CurveView::okFrame() { KDRect okFrame = KDRectZero; if (m_okView && (m_mainViewSelected || m_forceOkDisplay)) { + KDCoordinate bannerHeight = 0; + if (m_bannerView != nullptr) { + bannerHeight = m_bannerView->minimalSizeForOptimalDisplay().height(); + } KDSize okSize = m_okView->minimalSizeForOptimalDisplay(); - okFrame = KDRect(bounds().width()- okSize.width()-k_okHorizontalMargin, bounds().y()+k_okVerticalMargin, okSize); + okFrame = KDRect(bounds().width()- okSize.width()-k_okHorizontalMargin, bounds().height()- bannerHeight-okSize.height()-k_okVerticalMargin, okSize); } return okFrame; } diff --git a/apps/shared/curve_view.h b/apps/shared/curve_view.h index 21fbeb208..d92395614 100644 --- a/apps/shared/curve_view.h +++ b/apps/shared/curve_view.h @@ -38,7 +38,7 @@ protected: // Drawing methods virtual float samplingRatio() const; constexpr static KDCoordinate k_labelMargin = 4; - constexpr static KDCoordinate k_okVerticalMargin = 3; + constexpr static KDCoordinate k_okVerticalMargin = 23; constexpr static KDCoordinate k_okHorizontalMargin = 10; constexpr static KDCoordinate k_labelGraduationLength = 6; constexpr static int k_maxNumberOfXLabels = CurveViewRange::k_maxNumberOfXGridUnits;