Change search boxes in Editor to stick to the top of the panel

This commit is contained in:
Wojtek Figat
2022-07-19 15:37:10 +02:00
parent ea54505c6d
commit 1019550d4a
3 changed files with 9 additions and 6 deletions

View File

@@ -119,9 +119,9 @@ namespace FlaxEditor.Windows.Assets
var headerPanel = new ContainerControl
{
AnchorPreset = AnchorPresets.HorizontalStretchTop,
IsScrollable = true,
BackgroundColor = Style.Current.Background,
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
Parent = sceneTreePanel,
};
_searchBox = new TextBox
{
@@ -143,6 +143,7 @@ namespace FlaxEditor.Windows.Assets
_tree.SelectedChanged += OnTreeSelectedChanged;
_tree.RightClick += OnTreeRightClick;
_tree.Parent = sceneTreePanel;
headerPanel.Parent = sceneTreePanel;
// Prefab viewport
_viewport = new PrefabWindowViewport(this)

View File

@@ -107,9 +107,9 @@ namespace FlaxEditor.Windows
var headerPanel = new ContainerControl
{
AnchorPreset = AnchorPresets.HorizontalStretchTop,
IsScrollable = true,
BackgroundColor = Style.Current.Background,
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
Parent = _split.Panel1,
};
_foldersSearchBox = new TextBox
{
@@ -127,6 +127,7 @@ namespace FlaxEditor.Windows
Parent = _split.Panel1,
};
_tree.SelectedChanged += OnTreeSelectionChanged;
headerPanel.Parent = _split.Panel1;
// Content items searching query input box and filters selector
var contentItemsSearchPanel = new ContainerControl

View File

@@ -151,9 +151,9 @@ namespace FlaxEditor.Windows
var headerPanel = new ContainerControl
{
AnchorPreset = AnchorPresets.HorizontalStretchTop,
IsScrollable = true,
BackgroundColor = Style.Current.Background,
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
Parent = this,
};
_searchBox = new TextBox
{
@@ -177,6 +177,7 @@ namespace FlaxEditor.Windows
_tree.SelectedChanged += Tree_OnSelectedChanged;
_tree.RightClick += OnTreeRightClick;
_tree.Parent = this;
headerPanel.Parent = this;
// Setup input actions
InputActions.Add(options => options.TranslateMode, () => Editor.MainTransformGizmo.ActiveMode = TransformGizmoBase.Mode.Translate);