mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 17:19:28 +01:00
UI: Skip hidden views in AnchorLayout
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5c4b1be7f5
commit
7ddd0ce33b
1 file changed
+4
@@ -908,6 +908,8 @@ void AnchorLayout::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec v
|
||||
|
||||
void AnchorLayout::MeasureViews(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) {
|
||||
for (size_t i = 0; i < views_.size(); i++) {
|
||||
if (views_[i]->GetVisibility() == V_GONE)
|
||||
continue;
|
||||
Size width = WRAP_CONTENT;
|
||||
Size height = WRAP_CONTENT;
|
||||
|
||||
@@ -1003,6 +1005,8 @@ static void ApplyAnchorLayoutParams(float measuredWidth, float measuredHeight, c
|
||||
|
||||
void AnchorLayout::Layout() {
|
||||
for (size_t i = 0; i < views_.size(); i++) {
|
||||
if (views_[i]->GetVisibility() == V_GONE)
|
||||
continue;
|
||||
const AnchorLayoutParams *params = views_[i]->GetLayoutParams()->As<AnchorLayoutParams>();
|
||||
Bounds vBounds;
|
||||
ApplyAnchorLayoutParams(views_[i]->GetMeasuredWidth(), views_[i]->GetMeasuredHeight(), bounds_, params, &vBounds);
|
||||
|
||||
Reference in new issue
Block a user