mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 07:10:40 +01:00
Kandinsky: Get rid of KDCoordinateMax
Which is annoying to handle, because once you define it you have to bother with additions overflowing... Change-Id: I50b19858342c5a2909e3078f1a4167be50210db1
This commit is contained in:
@@ -51,12 +51,7 @@ void ScrollView::layoutSubviews() {
|
||||
m_verticalScrollIndicator.setFrame(verticalIndicatorFrame);
|
||||
|
||||
// Layout contentview
|
||||
KDRect contentFrame;
|
||||
contentFrame.origin = m_offset;
|
||||
//contentFrame.size = m_contentView->bounds().size;
|
||||
contentFrame.width = KDCoordinateMax;
|
||||
contentFrame.height = KDCoordinateMax;
|
||||
m_contentView->setFrame(contentFrame);
|
||||
setContentViewOrigin();
|
||||
}
|
||||
|
||||
void ScrollView::setContentOffset(KDPoint offset) {
|
||||
@@ -72,6 +67,13 @@ void ScrollView::setContentOffset(KDPoint offset) {
|
||||
markAsNeedingRedraw();
|
||||
}
|
||||
|
||||
void ScrollView::setContentViewOrigin() {
|
||||
KDRect contentFrame;
|
||||
contentFrame.origin = m_offset;
|
||||
contentFrame.size = m_contentView->bounds().size;
|
||||
m_contentView->setFrame(contentFrame);
|
||||
}
|
||||
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
const char * ScrollView::className() const {
|
||||
return "ScrollView";
|
||||
|
||||
Reference in New Issue
Block a user