From cd328d50b17f9db3cd5a6771c68a0e3e12427795 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 22 Aug 2019 19:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0AxisLine=E7=9A=84Width?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/Editor/PropertyDrawers/AxisLineDrawer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/Editor/PropertyDrawers/AxisLineDrawer.cs b/Scripts/Editor/PropertyDrawers/AxisLineDrawer.cs index 96ffa811..cbfbb17b 100644 --- a/Scripts/Editor/PropertyDrawers/AxisLineDrawer.cs +++ b/Scripts/Editor/PropertyDrawers/AxisLineDrawer.cs @@ -15,6 +15,7 @@ namespace XCharts drawRect.height = EditorGUIUtility.singleLineHeight; SerializedProperty show = prop.FindPropertyRelative("m_Show"); SerializedProperty m_OnZero = prop.FindPropertyRelative("m_OnZero"); + SerializedProperty m_Width = prop.FindPropertyRelative("m_Width"); SerializedProperty m_Symbol = prop.FindPropertyRelative("m_Symbol"); SerializedProperty m_SymbolWidth = prop.FindPropertyRelative("m_SymbolWidth"); SerializedProperty m_SymbolHeight = prop.FindPropertyRelative("m_SymbolHeight"); @@ -28,6 +29,8 @@ namespace XCharts ++EditorGUI.indentLevel; EditorGUI.PropertyField(drawRect, m_OnZero); drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; + EditorGUI.PropertyField(drawRect, m_Width); + drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; EditorGUI.PropertyField(drawRect, m_Symbol); drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; EditorGUI.PropertyField(drawRect, m_SymbolWidth); @@ -47,7 +50,7 @@ namespace XCharts float height = 0; if (ChartEditorHelper.IsToggle(m_AxisLineToggle,prop)) { - height += 6 * EditorGUIUtility.singleLineHeight + 7 * EditorGUIUtility.standardVerticalSpacing; + height += 7 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing; } return height; }