mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Default item width for AlwaysAutoResize windows expressed as a factor of font height
This commit is contained in:
parent
34aad73fd8
commit
79198fd6a5
@ -3452,7 +3452,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
||||
if (window->Size.x > 0.0f && !(flags & ImGuiWindowFlags_Tooltip) && !(flags & ImGuiWindowFlags_AlwaysAutoResize))
|
||||
window->ItemWidthDefault = (float)(int)(window->Size.x * 0.65f);
|
||||
else
|
||||
window->ItemWidthDefault = 200.0f;
|
||||
window->ItemWidthDefault = (float)(int)(g.FontSize * 16.0f);
|
||||
|
||||
// Prepare for focus requests
|
||||
window->FocusIdxAllRequestCurrent = (window->FocusIdxAllRequestNext == IM_INT_MAX || window->FocusIdxAllCounter == -1) ? IM_INT_MAX : (window->FocusIdxAllRequestNext + (window->FocusIdxAllCounter+1)) % (window->FocusIdxAllCounter+1);
|
||||
|
Loading…
Reference in New Issue
Block a user