mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
UI: Allow scoll views to have specific height.
This commit is contained in:
parent
cf22268bc1
commit
5e3ffe94b3
@ -765,10 +765,10 @@ void ScrollView::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec ver
|
||||
MeasureBySpec(layoutParams_->width, views_[0]->GetMeasuredWidth(), horiz, &measuredWidth_);
|
||||
}
|
||||
if (orientation_ == ORIENT_VERTICAL && vert.type != EXACTLY) {
|
||||
if (measuredHeight_ < views_[0]->GetMeasuredHeight()) {
|
||||
if (measuredHeight_ < views_[0]->GetMeasuredHeight() && layoutParams_->height < 0.0f) {
|
||||
measuredHeight_ = views_[0]->GetMeasuredHeight();
|
||||
}
|
||||
if (measuredHeight_ < views_[0]->GetBounds().h) {
|
||||
if (measuredHeight_ < views_[0]->GetBounds().h && layoutParams_->height < 0.0f) {
|
||||
measuredHeight_ = views_[0]->GetBounds().h;
|
||||
}
|
||||
if (vert.type == AT_MOST && measuredHeight_ > vert.size) {
|
||||
|
@ -1535,7 +1535,7 @@ void GridSettingsScreen::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
auto sy = GetI18NCategory("System");
|
||||
|
||||
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, 50, 1.0f));
|
||||
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f));
|
||||
LinearLayout *items = new LinearLayoutList(ORIENT_VERTICAL);
|
||||
|
||||
items->Add(new CheckBox(&g_Config.bGridView1, sy->T("Display Recent on a grid")));
|
||||
|
Loading…
Reference in New Issue
Block a user