From f7df2f78b8f2cb5fcb77ea230e7d54abd49e2ac8 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 29 Dec 2025 03:10:13 -0600 Subject: [PATCH] only scale pixel sizes --- src/ui/ui_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index 55409559..0fdc97d1 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -1079,14 +1079,18 @@ void UI_EndFrame(UI_Frame *frame) Assert(post_index == boxes_count); } - // Apply scales + // Scale semantic pixel sizes for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index) { UI_Box *box = boxes_pre[pre_index]; for (Axis axis = 0; axis < Axis_COUNTXY; ++axis) { UI_Size *sem_dims = &box->desc.pref_semantic_dims[axis]; - sem_dims->v *= box->desc.scale; + b32 skip = sem_dims->kind != UI_SizeKind_Pixel; + if (!skip) + { + sem_dims->v *= box->desc.scale; + } } }