[escher/scroll_view] Mark maxContent...DisplayableWithoutScrolling() as const

This commit is contained in:
Ruben Dashyan
2019-01-31 15:15:02 +01:00
committed by EmilieNumworks
parent acecb92f75
commit c439d6f376
2 changed files with 6 additions and 10 deletions

View File

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

View File

@@ -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(),