Skip to content

Commit

Permalink
chore: replaced "ContentContainerFlexGrow" method with get/set property
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlo-klymentenko committed Aug 10, 2023
1 parent 48f35db commit c97cc34
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public abstract class PackageSettingsWindow<TWindow> : EditorWindow where TWindo

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

/// <summary>
/// Set/Get the flexible growth property of tabs content container
/// </summary>
public StyleFloat ContentFlexGrow
{
get => m_TabsContainer.contentContainer.style.flexGrow;
set => m_TabsContainer.contentContainer.style.flexGrow = value;
}

void OnEnable()
{
// This is a workaround due to a very weird bug.
Expand Down Expand Up @@ -82,15 +91,6 @@ protected void AddTab(string label, VisualElement content)
throw new ArgumentException($"Tab '{label}' already added", nameof(label));
}
}

/// <summary>
/// Set the flexible growth property of tabs content container
/// </summary>
/// <param name="styleFloat"></param>
protected void ContentContainerFlexGrow(StyleFloat styleFloat)
{
m_TabsContainer.contentContainer.style.flexGrow = styleFloat;
}

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

0 comments on commit c97cc34

Please sign in to comment.