From c6a29687b2ab4986696e0e20a6cc91ab26791af2 Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Thu, 17 Sep 2020 19:32:50 +0200 Subject: [PATCH] Fixed UI alignment of framesettings --- com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs | 6 ++++-- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs index 12cf2bb05c5..c9520e64f16 100644 --- a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs +++ b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs @@ -227,6 +227,7 @@ public static void DrawMultipleFields(GUIContent label, SerializedProperty[] ppt public static void DrawSplitter(bool isBoxed = false) { var rect = GUILayoutUtility.GetRect(1f, 1f); + float xMin = rect.xMin; // Splitter rect should be full-width rect.xMin = 0f; @@ -234,7 +235,7 @@ public static void DrawSplitter(bool isBoxed = false) if (isBoxed) { - rect.xMin = EditorGUIUtility.singleLineHeight; + rect.xMin = xMin == 7.0 ? 4.0f : EditorGUIUtility.singleLineHeight; rect.width -= 1; } @@ -299,6 +300,7 @@ public static bool DrawHeaderFoldout(GUIContent title, bool state, bool isBoxed { const float height = 17f; var backgroundRect = GUILayoutUtility.GetRect(1f, height); + float xMin = backgroundRect.xMin; var labelRect = backgroundRect; labelRect.xMin += 16f; @@ -328,7 +330,7 @@ public static bool DrawHeaderFoldout(GUIContent title, bool state, bool isBoxed { labelRect.xMin += 5; foldoutRect.xMin += 5; - backgroundRect.xMin = EditorGUIUtility.singleLineHeight; + backgroundRect.xMin = xMin == 7.0 ? 4.0f : EditorGUIUtility.singleLineHeight; backgroundRect.width -= 1; } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c3ae54de7f0..be949fbde5e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -80,6 +80,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with mipmap debug mode not properly resetting full screen mode (and viceversa). - Added unsupported message when using tile debug mode with MSAA. - Fixed SSGI compilation issues on PS4. +- Fixed alignment of framesettings in HDRP Default Settings ### Changed - Preparation pass for RTSSShadows to be supported by render graph.