Codechange: Use Rect WithX/WithY in some places.

This commit is contained in:
Peter Nelson
2025-09-21 20:35:58 +01:00
committed by dP
parent 3b5168cb92
commit 32b92a6594
11 changed files with 29 additions and 27 deletions

View File

@@ -870,7 +870,7 @@ Rect QueryString::GetBoundingRect(const Window *w, WidgetID wid, size_t from, si
const auto p1 = GetCharPosInString(tb->GetText(), from, FS_NORMAL);
const auto p2 = from != to ? GetCharPosInString(tb->GetText(), to, FS_NORMAL) : p1;
return { Clamp(r.left + p1.left, r.left, r.right), r.top, Clamp(r.left + p2.right, r.left, r.right), r.bottom };
return r.WithX(Clamp(r.left + p1.left, r.left, r.right), Clamp(r.left + p2.right, r.left, r.right));
}
/**