only scale pixel sizes
This commit is contained in:
parent
211a6e641d
commit
f7df2f78b8
@ -1079,16 +1079,20 @@ void UI_EndFrame(UI_Frame *frame)
|
|||||||
Assert(post_index == boxes_count);
|
Assert(post_index == boxes_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply scales
|
// Scale semantic pixel sizes
|
||||||
for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index)
|
for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index)
|
||||||
{
|
{
|
||||||
UI_Box *box = boxes_pre[pre_index];
|
UI_Box *box = boxes_pre[pre_index];
|
||||||
for (Axis axis = 0; axis < Axis_COUNTXY; ++axis)
|
for (Axis axis = 0; axis < Axis_COUNTXY; ++axis)
|
||||||
{
|
{
|
||||||
UI_Size *sem_dims = &box->desc.pref_semantic_dims[axis];
|
UI_Size *sem_dims = &box->desc.pref_semantic_dims[axis];
|
||||||
|
b32 skip = sem_dims->kind != UI_SizeKind_Pixel;
|
||||||
|
if (!skip)
|
||||||
|
{
|
||||||
sem_dims->v *= box->desc.scale;
|
sem_dims->v *= box->desc.scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Compute independent sizes
|
// Compute independent sizes
|
||||||
for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index)
|
for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user