From c943b3a526a7dfdf9f43d2eda5863339c0781b6a Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 22 Sep 2024 11:08:31 +0200 Subject: [PATCH] Restore single editor tab window header on platforms with not yet implemented drag features (mac, linux) #2770 --- Source/Editor/GUI/Docking/DockPanelProxy.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Editor/GUI/Docking/DockPanelProxy.cs b/Source/Editor/GUI/Docking/DockPanelProxy.cs index f489b0c39..bc38e2953 100644 --- a/Source/Editor/GUI/Docking/DockPanelProxy.cs +++ b/Source/Editor/GUI/Docking/DockPanelProxy.cs @@ -14,6 +14,11 @@ namespace FlaxEditor.GUI.Docking { private DockPanel _panel; private double _dragEnterTime = -1; + #if PLATFORM_WINDOWS + private const bool HideTabForSingleTab = true; + #else + private const bool HideTabForSingleTab = false; + #endif /// /// The is mouse down flag (left button). @@ -51,7 +56,7 @@ namespace FlaxEditor.GUI.Docking public DockWindow StartDragAsyncWindow; private Rectangle HeaderRectangle => new Rectangle(0, 0, Width, DockPanel.DefaultHeaderHeight); - private bool IsSingleFloatingWindow => _panel.TabsCount == 1 && _panel.IsFloating && _panel.ChildPanelsCount == 0; + private bool IsSingleFloatingWindow => HideTabForSingleTab && _panel.TabsCount == 1 && _panel.IsFloating && _panel.ChildPanelsCount == 0; /// /// Initializes a new instance of the class.