diff --git a/escher/include/escher/scroll_view.h b/escher/include/escher/scroll_view.h index a460ebe38..5789d56f5 100644 --- a/escher/include/escher/scroll_view.h +++ b/escher/include/escher/scroll_view.h @@ -84,8 +84,12 @@ public: void scrollToContentPoint(KDPoint p, bool allowOverscroll = false); void scrollToContentRect(KDRect rect, bool allowOverscroll = false); // Minimal scrolling to make this rect visible protected: - KDCoordinate maxContentWidthDisplayableWithoutScrolling(); - KDCoordinate maxContentHeightDisplayableWithoutScrolling(); + KDCoordinate maxContentWidthDisplayableWithoutScrolling() const { + return m_frame.width() - m_leftMargin - m_rightMargin; + } + KDCoordinate maxContentHeightDisplayableWithoutScrolling() const { + return m_frame.height() - m_topMargin - m_bottomMargin; + } KDRect visibleContentRect(); void layoutSubviews() override; KDSize contentSize(); diff --git a/escher/src/scroll_view.cpp b/escher/src/scroll_view.cpp index a3fe12419..bd65b9f1c 100644 --- a/escher/src/scroll_view.cpp +++ b/escher/src/scroll_view.cpp @@ -126,14 +126,6 @@ void ScrollView::setContentOffset(KDPoint offset, bool forceRelayout) { } } -KDCoordinate ScrollView::maxContentWidthDisplayableWithoutScrolling() { - return m_frame.width() - m_leftMargin - m_rightMargin; -} - -KDCoordinate ScrollView::maxContentHeightDisplayableWithoutScrolling() { - return m_frame.height() - m_topMargin - m_bottomMargin; -} - ScrollView::BarDecorator::BarDecorator() : m_verticalBar(), m_horizontalBar(),