Refactor: Call GetLayoutBounds on the screen instead of the context where possible.

This will allow screens to influence the layout bounds in a unified way
This commit is contained in:
Henrik Rydgård committed 2026-03-14 13:07:48 +01:00
1 parent c5e0403ffd
commit 160e2c4f9b
15 files changed
+33 -26

No files matched your search

+1 -1
View File
@@ -142,7 +142,7 @@ void CustomButtonMappingScreen::CreateDialogViews(UI::ViewGroup *parent) {
array[i] = (0x01 == ((g_Config.CustomButton[id_].key >> i) & 0x01));
// TODO: Less hacky layout work
const Bounds layoutBounds = screenManager()->getUIContext()->GetLayoutBounds();
const Bounds layoutBounds = screenManager()->getUIContext()->GetLayoutBounds(false);
leftColumn->Add(new ButtonPreview(g_Config.iTouchButtonStyle == 0 ? customKeyShapes[cfg->shape].i : customKeyShapes[cfg->shape].l,
customKeyImages[cfg->image].i, customKeyImages[cfg->image].r, customKeyShapes[cfg->shape].f, customKeyShapes[cfg->shape].r, layoutBounds.x + 62, layoutBounds.y + 102));