Skip to content

Commit

Permalink
Improved appearance of Dependencies item in Details section
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnulusGames committed Jan 21, 2024
1 parent 7dbc5c5 commit 8a566e6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/NuGetForUnity/Editor/Ui/NugetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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...");
}

Expand Down

0 comments on commit 8a566e6

Please sign in to comment.