diff --git a/Source/Editor/GUI/Docking/DockPanelProxy.cs b/Source/Editor/GUI/Docking/DockPanelProxy.cs index bc38e2953..ad25d6c85 100644 --- a/Source/Editor/GUI/Docking/DockPanelProxy.cs +++ b/Source/Editor/GUI/Docking/DockPanelProxy.cs @@ -14,11 +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 +#if PLATFORM_WINDOWS + private readonly bool _hideTabForSingleTab = Editor.Instance.Options.Options.Interface.HideSingleTabWindowTabBars; +#else + private readonly bool _hideTabForSingleTab = false; +#endif /// /// The is mouse down flag (left button). @@ -57,6 +57,7 @@ namespace FlaxEditor.GUI.Docking private Rectangle HeaderRectangle => new Rectangle(0, 0, Width, DockPanel.DefaultHeaderHeight); private bool IsSingleFloatingWindow => HideTabForSingleTab && _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. diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs index 4cd76adc6..a6189e34c 100644 --- a/Source/Editor/Options/InterfaceOptions.cs +++ b/Source/Editor/Options/InterfaceOptions.cs @@ -167,15 +167,6 @@ namespace FlaxEditor.Options [EditorDisplay("Interface"), EditorOrder(10), Tooltip("Editor User Interface scale. Applied to all UI elements, windows and text. Can be used to scale the interface up on a bigger display. Editor restart required.")] public float InterfaceScale { get; set; } = 1.0f; -#if PLATFORM_WINDOWS - /// - /// Gets or sets a value indicating whether use native window title bar. Editor restart required. - /// - [DefaultValue(false)] - [EditorDisplay("Interface"), EditorOrder(70), Tooltip("Determines whether use native window title bar. Editor restart required.")] - public bool UseNativeWindowSystem { get; set; } = false; -#endif - /// /// Gets or sets a value indicating whether show selected camera preview in the editor window. /// @@ -183,20 +174,6 @@ namespace FlaxEditor.Options [EditorDisplay("Interface"), EditorOrder(80), Tooltip("Determines whether show selected camera preview in the edit window.")] public bool ShowSelectedCameraPreview { get; set; } = true; - /// - /// Gets or sets a value indicating whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor. - /// - [DefaultValue(false)] - [EditorDisplay("Interface", "Center Mouse On Game Window Focus"), EditorOrder(100), Tooltip("Determines whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor.")] - public bool CenterMouseOnGameWinFocus { get; set; } = false; - - /// - /// Gets or sets the method window opening. - /// - [DefaultValue(DockStateProxy.Float)] - [EditorDisplay("Interface", "New Window Location"), EditorOrder(150), Tooltip("Define the opening method for new windows, open in a new tab by default.")] - public DockStateProxy NewWindowLocation { get; set; } = DockStateProxy.Float; - /// /// Gets or sets the editor icons scale. Editor restart required. /// @@ -265,6 +242,38 @@ namespace FlaxEditor.Options [EditorDisplay("Interface"), EditorOrder(322)] public bool ScrollToScriptOnAdd { get; set; } = true; +#if PLATFORM_WINDOWS + /// + /// Gets or sets a value indicating whether use native window title bar. Editor restart required. + /// + [DefaultValue(false)] + [EditorDisplay("Tabs & Windows"), EditorOrder(70), Tooltip("Determines whether use native window title bar. Editor restart required.")] + public bool UseNativeWindowSystem { get; set; } = false; +#endif + +#if PLATFORM_WINDOWS + /// + /// Gets or sets a value indicating whether a window containing a single tabs hides the tab bar. Editor restart recommended. + /// + [DefaultValue(true)] + [EditorDisplay("Tabs & Windows", "Hide Single-Tab Window Tab Bars"), EditorOrder(71)] + public bool HideSingleTabWindowTabBars { get; set; } = true; +#endif + + /// + /// Gets or sets a value indicating whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor. + /// + [DefaultValue(false)] + [EditorDisplay("Tabs & Windows", "Center Mouse On Game Window Focus"), EditorOrder(101), Tooltip("Determines whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor.")] + public bool CenterMouseOnGameWinFocus { get; set; } = false; + + /// + /// Gets or sets the method window opening. + /// + [DefaultValue(DockStateProxy.Float)] + [EditorDisplay("Tabs & Windows", "New Window Location"), EditorOrder(150), Tooltip("Define the opening method for new windows, open in a new tab by default.")] + public DockStateProxy NewWindowLocation { get; set; } = DockStateProxy.Float; + /// /// Gets or sets the timestamps prefix mode for output log messages. ///