mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] add getter for margins in scrollview
Change-Id: If12d7e6aec1f801c3b667ea9b0d44b85acd7ae42
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user