* Fix for failed unstrip with RectOffset(int, int, int, int) ctor
* Cleanups
This commit is contained in:
sinaioutlander 2020-09-07 03:25:43 +10:00
parent 692a37635e
commit 5b94e31a12
3 changed files with 16 additions and 5 deletions

View File

@ -55,14 +55,14 @@ namespace Explorer
// make generic dictionary from key and value type // make generic dictionary from key and value type
var dict = (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>) var dict = (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>)
.MakeGenericType(TypeOfKeys, TypeOfValues)); .MakeGenericType(TypeOfKeys, TypeOfValues));
// get keys and values // get keys and values
var keys = ValueType.GetProperty("Keys") .GetValue(Value); var keys = ValueType.GetProperty("Keys") .GetValue(Value);
var values = ValueType.GetProperty("Values").GetValue(Value); var values = ValueType.GetProperty("Values").GetValue(Value);
// create a list to hold them // create lists to hold them
var keyList = new List<object>(); var keyList = new List<object>();
var valueList = new List<object>(); var valueList = new List<object>();
// get keys enumerator and store keys // get keys enumerator and store keys

View File

@ -212,6 +212,11 @@ namespace Explorer
cacheList.WhiteSpace = 0f; cacheList.WhiteSpace = 0f;
cacheList.ButtonWidthOffset += 70f; cacheList.ButtonWidthOffset += 70f;
} }
else if (m_cachedReturnValue is CacheDictionary cacheDict)
{
cacheDict.WhiteSpace = 0f;
cacheDict.ButtonWidthOffset += 70f;
}
m_cachedReturnValue.UpdateValue(); m_cachedReturnValue.UpdateValue();
} }
else else

View File

@ -56,7 +56,10 @@ namespace Explorer
{ {
_horizBarStyle = new GUIStyle(); _horizBarStyle = new GUIStyle();
_horizBarStyle.normal.background = Texture2D.whiteTexture; _horizBarStyle.normal.background = Texture2D.whiteTexture;
_horizBarStyle.margin = new RectOffset(0, 0, 4, 4); var rectOffset = new RectOffset();
rectOffset.top = 4;
rectOffset.bottom = 4;
_horizBarStyle.margin = rectOffset;
_horizBarStyle.fixedHeight = 2; _horizBarStyle.fixedHeight = 2;
} }
@ -73,7 +76,10 @@ namespace Explorer
{ {
_horizBarSmallStyle = new GUIStyle(); _horizBarSmallStyle = new GUIStyle();
_horizBarSmallStyle.normal.background = Texture2D.whiteTexture; _horizBarSmallStyle.normal.background = Texture2D.whiteTexture;
_horizBarSmallStyle.margin = new RectOffset(0, 0, 2, 2); var rectOffset = new RectOffset();
rectOffset.top = 2;
rectOffset.bottom = 2;
_horizBarSmallStyle.margin = rectOffset;
_horizBarSmallStyle.fixedHeight = 1; _horizBarSmallStyle.fixedHeight = 1;
} }