From 8a566e63c1c805242b90aafea70ac7b5ef5e80ef Mon Sep 17 00:00:00 2001 From: AnnulusGames Date: Sun, 21 Jan 2024 12:12:43 +0900 Subject: [PATCH] Improved appearance of Dependencies item in Details section --- src/NuGetForUnity/Editor/Ui/NugetWindow.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NuGetForUnity/Editor/Ui/NugetWindow.cs b/src/NuGetForUnity/Editor/Ui/NugetWindow.cs index 67fd5dd0..3e5dd687 100644 --- a/src/NuGetForUnity/Editor/Ui/NugetWindow.cs +++ b/src/NuGetForUnity/Editor/Ui/NugetWindow.cs @@ -1234,12 +1234,14 @@ private void DrawPackage(INugetPackage package, GUIStyle backgroundStyle, bool c { EditorGUILayout.LabelField("Description", EditorStyles.boldLabel); EditorGUILayout.LabelField(package.Description); + GUILayout.Space(4f); } if (!string.IsNullOrEmpty(package.ReleaseNotes)) { EditorGUILayout.LabelField("Release Notes", EditorStyles.boldLabel); EditorGUILayout.LabelField(package.ReleaseNotes); + GUILayout.Space(4f); } // Show project URL link @@ -1256,21 +1258,20 @@ private void DrawPackage(INugetPackage package, GUIStyle backgroundStyle, bool c var frameworkDependencies = package.CurrentFrameworkDependencies; if (frameworkDependencies.Count > 0) { + EditorGUILayout.LabelField("Dependencies", EditorStyles.boldLabel); labelStyle.fontStyle = FontStyle.Italic; var builder = new StringBuilder(); foreach (var dependency in frameworkDependencies) { - builder.Append($" {dependency.Id} {dependency.Version};"); + builder.AppendLine($"{dependency.Id} {dependency.Version};"); } - EditorGUILayout.Space(); - EditorGUILayout.LabelField($"Depends on:{builder}", labelStyle); + EditorGUILayout.LabelField(builder.ToString(), labelStyle); } } else { - EditorGUILayout.Space(); EditorGUILayout.LabelField("Loading dependencies..."); }