mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). (#5843)
This commit is contained in:
parent
86f2af2bc7
commit
6e9dfe1de1
@ -138,6 +138,7 @@ Other Changes:
|
|||||||
- Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
|
- Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
|
||||||
- Window: Fixed a potential crash when appending to a child window. (#5515, #3496, #4797) [@rokups]
|
- Window: Fixed a potential crash when appending to a child window. (#5515, #3496, #4797) [@rokups]
|
||||||
- Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
|
- Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
|
||||||
|
- Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). (#5843)
|
||||||
- IO: Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456)
|
- IO: Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456)
|
||||||
- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
|
- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
|
||||||
can apply to mouse data as well. (#4921)
|
can apply to mouse data as well. (#4921)
|
||||||
|
@ -5732,8 +5732,7 @@ static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& size_cont
|
|||||||
if (is_popup || is_menu) // Popups and menus bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups)
|
if (is_popup || is_menu) // Popups and menus bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups)
|
||||||
size_min = ImMin(size_min, ImVec2(4.0f, 4.0f));
|
size_min = ImMin(size_min, ImVec2(4.0f, 4.0f));
|
||||||
|
|
||||||
// FIXME-VIEWPORT-WORKAREA: May want to use GetWorkSize() instead of Size depending on the type of windows?
|
ImVec2 avail_size = ImGui::GetMainViewport()->WorkSize;
|
||||||
ImVec2 avail_size = ImGui::GetMainViewport()->Size;
|
|
||||||
ImVec2 size_auto_fit = ImClamp(size_desired, size_min, ImMax(size_min, avail_size - style.DisplaySafeAreaPadding * 2.0f));
|
ImVec2 size_auto_fit = ImClamp(size_desired, size_min, ImMax(size_min, avail_size - style.DisplaySafeAreaPadding * 2.0f));
|
||||||
|
|
||||||
// When the window cannot fit all contents (either because of constraints, either because screen is too small),
|
// When the window cannot fit all contents (either because of constraints, either because screen is too small),
|
||||||
|
2
imgui.h
2
imgui.h
@ -23,7 +23,7 @@
|
|||||||
// Library Version
|
// Library Version
|
||||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
|
||||||
#define IMGUI_VERSION "1.89 WIP"
|
#define IMGUI_VERSION "1.89 WIP"
|
||||||
#define IMGUI_VERSION_NUM 18833
|
#define IMGUI_VERSION_NUM 18834
|
||||||
#define IMGUI_HAS_TABLE
|
#define IMGUI_HAS_TABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user