Skip to content

Commit

Permalink
fix gui style warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMa0012 committed Oct 30, 2023
1 parent 3b26e55 commit 8a70073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Editor/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static float PowPreserveSign(float f, float p)

#region GUI Styles

public static readonly GUIStyle guiStyles_IconButton = new GUIStyle("IconButton") { fixedHeight = 0, fixedWidth = 0};
public static readonly GUIStyle guiStyles_IconButton = new GUIStyle(EditorStyles.iconButton) { fixedHeight = 0, fixedWidth = 0};

#endregion

Expand Down Expand Up @@ -217,8 +217,6 @@ public static Rect[] SplitRect(Rect rectToSplit, int n)
#endif
};

private static GUIStyle _guiStyle_Toggle = new GUIStyle("Toggle");
private static GUIStyle _guiStyle_ToggleMixed = new GUIStyle("ToggleMixed");
public static bool DrawFoldout(Rect rect, ref bool isFolding, bool toggleValue, bool hasToggle, GUIContent label)
{
var toggleRect = new Rect(rect.x + 8f, rect.y + 7f, 13f, 13f);
Expand Down Expand Up @@ -256,8 +254,7 @@ public static bool DrawFoldout(Rect rect, ref bool isFolding, bool toggleValue,
// Toggle Icon
if (hasToggle)
{
GUI.Toggle(toggleRect, EditorGUI.showMixedValue ? false : toggleValue, String.Empty,
EditorGUI.showMixedValue ? _guiStyle_ToggleMixed : _guiStyle_Toggle);
EditorGUI.Toggle(toggleRect, string.Empty, toggleValue);
}

return toggleValue;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.jasonma.lwgui",
"version": "1.13.2",
"version": "1.13.3",
"displayName": "LWGUI",
"description": "A Lightweight, Flexible, Powerful Shader GUI System for Unity.",
"keywords": [
Expand Down

0 comments on commit 8a70073

Please sign in to comment.