mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
DragScalarN, SliderScalarN, InputScalarN, PushMultiItemsWidths: fixed multi-components width in tight space (#7120, #7121)
+ extra tweak color ColorEdit4() label. Amend86512ea,3464662
This commit is contained in:
parent
0000739c08
commit
0bd6489721
2 changed files with 5 additions and 5 deletions
|
|
@ -9872,10 +9872,10 @@ void ImGui::PushMultiItemsWidths(int components, float w_full)
|
|||
for (int i = components - 1; i > 0; i--)
|
||||
{
|
||||
float next_split = IM_TRUNC(w_items * i / components);
|
||||
window->DC.ItemWidthStack.push_back(prev_split - next_split);
|
||||
window->DC.ItemWidthStack.push_back(ImMax(prev_split - next_split, 1.0f));
|
||||
prev_split = next_split;
|
||||
}
|
||||
window->DC.ItemWidth = prev_split;
|
||||
window->DC.ItemWidth = ImMax(prev_split, 1.0f);
|
||||
g.NextItemData.Flags &= ~ImGuiNextItemDataFlags_HasWidth;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue