Commit: bfa1eca5c49716ab15ae84cec07b275a85d3b068
Parent: 7138a16a9bb12a7e30953d2faf55619be0060038
Author: Randy Palamar
Date: Fri, 7 Aug 2026 06:33:57 -0700
ui: vertically center frame view
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ui.c b/ui.c
@@ -3053,14 +3053,22 @@ ui_build_frame_view(UINode *container, BeamformerFrameView *view)
b32 rebuild_transform = 0;
+ UINode *group;
+ UIAxisAlign(Axis2_X, Center)
+ UIChildLayoutAxis(Axis2_Y)
+ UIPrefHeight(ui_children_sum(1.f))
+ UIPrefWidth(ui_children_sum(1.f))
UIParent(container)
+ group = ui_spacer(0);
+
+ UIParent(group)
{
ui_padh(UI_NODE_PAD);
UINode *frame_top, *frame_view;
- UIChildLayoutAxis(Axis2_X)
UIPrefHeight(ui_children_sum(1.f))
UIPrefWidth(ui_children_sum(1.f))
+ UIChildLayoutAxis(Axis2_X)
frame_top = ui_node_from_string(0, str8("###frame_view_top"));
UIParent(frame_top)
@@ -4258,7 +4266,7 @@ ui_build_regions(UINode *root_node, BeamformerUIPanel *tree_root)
UIChildLayoutAxis(Axis2_Y)
UIPrefWidth(ui_pct(1.f, 0.5f))
UIPrefHeight(ui_pct(1.f, 0.5f))
- UIAxisAlign(Axis2_X, Center)
+ UIAxisAlign(Axis2_Y, Center)
container = ui_node_from_string(0, str8("###frame_view_container"));
ui_build_frame_view(container, view);
}