Revert "[apps] OK icon in graphs is in the top right corner"

This reverts commit 50c0b0b8a79ce62723c13aeafe36d1afc75ce5a5.
This commit is contained in:
Léa Saviot
2018-11-13 17:26:12 +01:00
committed by Émilie Feral
parent 5d6db930fd
commit 8088d0b57f
2 changed files with 6 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;