Skip to content

Commit

Permalink
Fixed shaking in preview inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorma committed Jul 2, 2020
1 parent 1f4db42 commit f949c38
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Assets/uAdventure/Editor/PreviewLayoutWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public override void Draw(int aID)

if (HasToDrawPreviewInspector())
{
var maxHeight = viewport.height- 25f;
var maxHeight = viewport.height - 26f;

windowRect.height = Mathf.Clamp(windowRect.height, 0, maxHeight);
// Create the preview inspector window
Expand All @@ -214,7 +214,7 @@ public override void Draw(int aID)

if (useScroll)
{
scroll = EditorGUILayout.BeginScrollView(scroll, GUILayout.Height(maxHeight));
scroll = EditorGUILayout.BeginScrollView(scroll, GUILayout.Height(maxHeight), GUILayout.Width(windowRect.width - 8));
}
DrawPreviewInspector();
if (useScroll)
Expand All @@ -233,7 +233,6 @@ public override void Draw(int aID)
}, "Properties")
.TrapInside(previewRect);


// And then, we update the position
windowRect = newWindowRect;

Expand Down

0 comments on commit f949c38

Please sign in to comment.