add option for single tab tab header bar visibility
This commit is contained in:
@@ -14,11 +14,11 @@ namespace FlaxEditor.GUI.Docking
|
|||||||
{
|
{
|
||||||
private DockPanel _panel;
|
private DockPanel _panel;
|
||||||
private double _dragEnterTime = -1;
|
private double _dragEnterTime = -1;
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
private const bool HideTabForSingleTab = true;
|
private readonly bool _hideTabForSingleTab = Editor.Instance.Options.Options.Interface.HideSingleTabWindowTabBars;
|
||||||
#else
|
#else
|
||||||
private const bool HideTabForSingleTab = false;
|
private readonly bool _hideTabForSingleTab = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The is mouse down flag (left button).
|
/// 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 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;
|
||||||
|
private bool IsSingleFloatingWindow => _hideTabForSingleTab && _panel.TabsCount == 1 && _panel.IsFloating && _panel.ChildPanelsCount == 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="DockPanelProxy"/> class.
|
/// Initializes a new instance of the <see cref="DockPanelProxy"/> class.
|
||||||
|
|||||||
@@ -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.")]
|
[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;
|
public float InterfaceScale { get; set; } = 1.0f;
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether use native window title bar. Editor restart required.
|
|
||||||
/// </summary>
|
|
||||||
[DefaultValue(false)]
|
|
||||||
[EditorDisplay("Interface"), EditorOrder(70), Tooltip("Determines whether use native window title bar. Editor restart required.")]
|
|
||||||
public bool UseNativeWindowSystem { get; set; } = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether show selected camera preview in the editor window.
|
/// Gets or sets a value indicating whether show selected camera preview in the editor window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -183,20 +174,6 @@ namespace FlaxEditor.Options
|
|||||||
[EditorDisplay("Interface"), EditorOrder(80), Tooltip("Determines whether show selected camera preview in the edit window.")]
|
[EditorDisplay("Interface"), EditorOrder(80), Tooltip("Determines whether show selected camera preview in the edit window.")]
|
||||||
public bool ShowSelectedCameraPreview { get; set; } = true;
|
public bool ShowSelectedCameraPreview { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 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.
|
|
||||||
/// </summary>
|
|
||||||
[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;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the method window opening.
|
|
||||||
/// </summary>
|
|
||||||
[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;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the editor icons scale. Editor restart required.
|
/// Gets or sets the editor icons scale. Editor restart required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -265,6 +242,38 @@ namespace FlaxEditor.Options
|
|||||||
[EditorDisplay("Interface"), EditorOrder(322)]
|
[EditorDisplay("Interface"), EditorOrder(322)]
|
||||||
public bool ScrollToScriptOnAdd { get; set; } = true;
|
public bool ScrollToScriptOnAdd { get; set; } = true;
|
||||||
|
|
||||||
|
#if PLATFORM_WINDOWS
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether use native window title bar. Editor restart required.
|
||||||
|
/// </summary>
|
||||||
|
[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
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether a window containing a single tabs hides the tab bar. Editor restart recommended.
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(true)]
|
||||||
|
[EditorDisplay("Tabs & Windows", "Hide Single-Tab Window Tab Bars"), EditorOrder(71)]
|
||||||
|
public bool HideSingleTabWindowTabBars { get; set; } = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
|
[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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the method window opening.
|
||||||
|
/// </summary>
|
||||||
|
[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;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the timestamps prefix mode for output log messages.
|
/// Gets or sets the timestamps prefix mode for output log messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user