|
2 | 2 | using System.Linq; |
3 | 3 | using UnityEngine; |
4 | 4 | using UnityEngine.UI; |
5 | | -using System.Globalization; |
6 | 5 |
|
7 | 6 | namespace UnityEditor.Events |
8 | 7 | { |
@@ -95,17 +94,17 @@ public override void OnPreviewGUI(Rect r, GUIStyle background) |
95 | 94 |
|
96 | 95 | // Show properties |
97 | 96 |
|
98 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Min Width", LayoutUtility.GetLayoutProperty(rect, e => e.minWidth, 0, out source).ToString(CultureInfo.InvariantCulture.NumberFormat), source); |
99 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Min Height", LayoutUtility.GetLayoutProperty(rect, e => e.minHeight, 0, out source).ToString(CultureInfo.InvariantCulture.NumberFormat), source); |
100 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Preferred Width", LayoutUtility.GetLayoutProperty(rect, e => e.preferredWidth, 0, out source).ToString(CultureInfo.InvariantCulture.NumberFormat), source); |
101 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Preferred Height", LayoutUtility.GetLayoutProperty(rect, e => e.preferredHeight, 0, out source).ToString(CultureInfo.InvariantCulture.NumberFormat), source); |
| 97 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Min Width", LayoutUtility.GetLayoutProperty(rect, e => e.minWidth, 0, out source).ToString(), source); |
| 98 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Min Height", LayoutUtility.GetLayoutProperty(rect, e => e.minHeight, 0, out source).ToString(), source); |
| 99 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Preferred Width", LayoutUtility.GetLayoutProperty(rect, e => e.preferredWidth, 0, out source).ToString(), source); |
| 100 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Preferred Height", LayoutUtility.GetLayoutProperty(rect, e => e.preferredHeight, 0, out source).ToString(), source); |
102 | 101 |
|
103 | 102 | float flexible = 0; |
104 | 103 |
|
105 | 104 | flexible = LayoutUtility.GetLayoutProperty(rect, e => e.flexibleWidth, 0, out source); |
106 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Flexible Width", flexible > 0 ? ("enabled (" + flexible.ToString(CultureInfo.InvariantCulture.NumberFormat) + ")") : "disabled", source); |
| 105 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Flexible Width", flexible > 0 ? ("enabled (" + flexible.ToString() + ")") : "disabled", source); |
107 | 106 | flexible = LayoutUtility.GetLayoutProperty(rect, e => e.flexibleHeight, 0, out source); |
108 | | - ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Flexible Height", flexible > 0 ? ("enabled (" + flexible.ToString(CultureInfo.InvariantCulture.NumberFormat) + ")") : "disabled", source); |
| 107 | + ShowProp(ref labelRect, ref valueRect, ref sourceRect, "Flexible Height", flexible > 0 ? ("enabled (" + flexible.ToString() + ")") : "disabled", source); |
109 | 108 |
|
110 | 109 | if (!rect.GetComponent<LayoutElement>()) |
111 | 110 | { |
|
0 commit comments