1.5.2: Fixed issue, where toolbar styles modified a style directly in a Unity GUISkin thereby given incorrect buttons in other windows

This commit is contained in:
Anders Ejlersen 2022-02-15 20:10:02 +01:00
parent 1d27a259e4
commit faf964ac93
2 changed files with 16 additions and 12 deletions

View file

@ -19,21 +19,25 @@ namespace Module.NavigationTool.Editor.Toolbar
return; return;
this.skin = skin; this.skin = skin;
popup = skin.FindStyle("ToolbarPopup"); popup = new GUIStyle(skin.FindStyle("ToolbarPopup"));
button = skin.FindStyle("toolbarbutton"); button = new GUIStyle(skin.FindStyle("toolbarbutton"));
buttonNoPadding = skin.FindStyle("toolbarbutton"); slider = new GUIStyle(skin.FindStyle("ToolbarSlider"));
buttonNoPadding.padding = new RectOffset(); label = new GUIStyle(skin.FindStyle("ToolbarLabel"));
slider = skin.FindStyle("ToolbarSlider");
label = skin.FindStyle("ToolbarLabel"); buttonNoPadding = new GUIStyle(skin.FindStyle("toolbarbutton"))
labelCenter = skin.FindStyle("ToolbarLabel"); {
labelCenter.alignment = TextAnchor.MiddleCenter; padding = new RectOffset()
};
labelCenter = new GUIStyle(skin.FindStyle("ToolbarLabel"))
{
alignment = TextAnchor.MiddleCenter
};
settingsGroup = new GUIStyle settingsGroup = new GUIStyle
{ {
margin = new RectOffset(8, 0, 8, 0) margin = new RectOffset(8, 0, 8, 0)
}; };
// Available: ToolbarBoldLabel, ToolbarBottom, ToolbarButtonLeft, ToolbarButtonRight, ToolbarDropDown,
// ToolbarLabel, ToolbarTextField, ...
} }
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "com.module.navigationtool", "name": "com.module.navigationtool",
"version": "1.5.1", "version": "1.5.2",
"displayName": "Module.NavigationTool", "displayName": "Module.NavigationTool",
"description": "Support for navigation tools, like favorites, history and toolbars", "description": "Support for navigation tools, like favorites, history and toolbars",
"unity": "2019.2", "unity": "2019.2",