Skip to content

Commit c455f8e

Browse files
chore: replaced "ContentContainerFlexGrow" method with get/set property
1 parent d01a0f0 commit c455f8e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Editor/UIToolkit/SettingsWindow/PackageSettingsWindow.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ public abstract class PackageSettingsWindow<TWindow> : EditorWindow where TWindo
2525

2626
readonly string m_WindowUIFilesRootPath = $"{PluginsDevKitPackage.UIToolkitPath}/SettingsWindow";
2727

28+
/// <summary>
29+
/// Set/Get the flexible growth property of tabs content container
30+
/// </summary>
31+
public StyleFloat ContentFlexGrow
32+
{
33+
get => m_TabsContainer.contentContainer.style.flexGrow;
34+
set => m_TabsContainer.contentContainer.style.flexGrow = value;
35+
}
36+
2837
void OnEnable()
2938
{
3039
// This is a workaround due to a very weird bug.
@@ -82,15 +91,6 @@ protected void AddTab(string label, VisualElement content)
8291
throw new ArgumentException($"Tab '{label}' already added", nameof(label));
8392
}
8493
}
85-
86-
/// <summary>
87-
/// Set the flexible growth property of tabs content container
88-
/// </summary>
89-
/// <param name="styleFloat"></param>
90-
protected void ContentContainerFlexGrow(StyleFloat styleFloat)
91-
{
92-
m_TabsContainer.contentContainer.style.flexGrow = styleFloat;
93-
}
9494

9595
/// <summary>
9696
/// Method will show and doc window next to the Inspector Window.

0 commit comments

Comments
 (0)