mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-26 10:35:30 +08:00
Docking, Tabs: toggling tab bar visibility marks saved settings as dirty. (#9380)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
+ tweak/improve packing for ImGuiDockNode.
This commit is contained in:
@@ -177,6 +177,8 @@ Other Changes:
|
||||
|
||||
Docking+Viewports Branch:
|
||||
|
||||
- Docking:
|
||||
- Toggling tab bar visibility marks saved settings as dirty. (#9380)
|
||||
- Viewports:
|
||||
- Added opaque `void* PlatformIconData` storage in viewport and ImGuiWindowClass
|
||||
to allow passing icon information to a custom backend or hook. (#2715)
|
||||
|
||||
@@ -18922,10 +18922,13 @@ static void ImGui::DockNodeUpdateFlagsAndCollapse(ImGuiDockNode* node)
|
||||
node->WantHiddenTabBarToggle = false;
|
||||
|
||||
// Apply toggles at a single point of the frame (here!)
|
||||
const ImGuiDockNodeFlags prev_local_flags = node->LocalFlags;
|
||||
if (node->Windows.Size > 1)
|
||||
node->SetLocalFlags(node->LocalFlags & ~ImGuiDockNodeFlags_HiddenTabBar);
|
||||
else if (node->WantHiddenTabBarToggle)
|
||||
node->SetLocalFlags(node->LocalFlags ^ ImGuiDockNodeFlags_HiddenTabBar);
|
||||
if ((node->LocalFlags ^ prev_local_flags) & ImGuiDockNodeFlags_SavedFlagsMask_)
|
||||
MarkIniSettingsDirty(); // Bit flaky to only do this here. Perhaps compare node flags every frame? #9380
|
||||
node->WantHiddenTabBarToggle = false;
|
||||
|
||||
DockNodeUpdateVisibleFlag(node);
|
||||
|
||||
+2
-2
@@ -2031,7 +2031,7 @@ enum ImGuiDockNodeState
|
||||
ImGuiDockNodeState_HostWindowVisible,
|
||||
};
|
||||
|
||||
// sizeof() 156~192
|
||||
// sizeof() 176~216
|
||||
struct IMGUI_API ImGuiDockNode
|
||||
{
|
||||
ImGuiID ID;
|
||||
@@ -2048,8 +2048,8 @@ struct IMGUI_API ImGuiDockNode
|
||||
ImVec2 Size; // Current size
|
||||
ImVec2 SizeRef; // [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
|
||||
ImGuiAxis SplitAxis; // [Split node only] Split axis (X or Y)
|
||||
ImGuiWindowClass WindowClass; // [Root node only]
|
||||
ImU32 LastBgColor;
|
||||
ImGuiWindowClass WindowClass; // [Root node only]
|
||||
|
||||
ImGuiWindow* HostWindow;
|
||||
ImGuiWindow* VisibleWindow; // Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.
|
||||
|
||||
Reference in New Issue
Block a user