diff --git a/escher/include/escher/scroll_view.h b/escher/include/escher/scroll_view.h index f55f529c8..4380d59ea 100644 --- a/escher/include/escher/scroll_view.h +++ b/escher/include/escher/scroll_view.h @@ -11,6 +11,8 @@ public: void setContentOffset(KDPoint offset); KDPoint contentOffset(); + KDCoordinate topMargin() const; + KDCoordinate leftMargin() const; void drawRect(KDContext * ctx, KDRect rect) const override; protected: KDCoordinate maxContentWidthDisplayableWithoutScrolling(); diff --git a/escher/src/scroll_view.cpp b/escher/src/scroll_view.cpp index d6dbaf954..e2c3ad93d 100644 --- a/escher/src/scroll_view.cpp +++ b/escher/src/scroll_view.cpp @@ -120,6 +120,13 @@ KDPoint ScrollView::contentOffset() { return m_offset; } +KDCoordinate ScrollView::topMargin() const { + return m_topMargin; +} + +KDCoordinate ScrollView::leftMargin() const { + return m_leftMargin; +} KDCoordinate ScrollView::maxContentWidthDisplayableWithoutScrolling() { return m_frame.width() - m_leftMargin - m_rightMargin;