mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-15 20:00:40 +00:00
Respect AT_MOST when measuring ScrollViews.
This commit is contained in:
parent
5c9cf65939
commit
f64159a3f2
@ -604,8 +604,17 @@ void ScrollView::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec ver
|
|||||||
views_[0]->Measure(dc, MeasureSpec(AT_MOST, measuredWidth_ - (margins.left + margins.right)), MeasureSpec(UNSPECIFIED));
|
views_[0]->Measure(dc, MeasureSpec(AT_MOST, measuredWidth_ - (margins.left + margins.right)), MeasureSpec(UNSPECIFIED));
|
||||||
MeasureBySpec(layoutParams_->width, views_[0]->GetMeasuredWidth(), horiz, &measuredWidth_);
|
MeasureBySpec(layoutParams_->width, views_[0]->GetMeasuredWidth(), horiz, &measuredWidth_);
|
||||||
}
|
}
|
||||||
if (orientation_ == ORIENT_VERTICAL && vert.type != EXACTLY && measuredHeight_ < views_[0]->GetBounds().h)
|
if (orientation_ == ORIENT_VERTICAL && vert.type != EXACTLY) {
|
||||||
measuredHeight_ = views_[0]->GetBounds().h;
|
if (measuredHeight_ < views_[0]->GetMeasuredHeight()) {
|
||||||
|
measuredHeight_ = views_[0]->GetMeasuredHeight();
|
||||||
|
}
|
||||||
|
if (measuredHeight_ < views_[0]->GetBounds().h) {
|
||||||
|
measuredHeight_ = views_[0]->GetBounds().h;
|
||||||
|
}
|
||||||
|
if (vert.type == AT_MOST && measuredHeight_ > vert.size) {
|
||||||
|
measuredHeight_ = vert.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user