From dc178d7e10082f72dc005c68fe200567da115bd1 Mon Sep 17 00:00:00 2001 From: Sol Williams <7689429+solwllms@users.noreply.github.com> Date: Wed, 18 Mar 2026 16:06:29 +0000 Subject: [PATCH] Launcher UI tweaks (#4331) * Fix project/template info text alignment * Boost pin + flyout menu button brightness * Add searchbox border * Splash uses same window icon as launcher --- engine/Launcher/StandaloneTest/Widgets/HomeWidget.cs | 5 ++--- engine/Launcher/StandaloneTest/Widgets/ItemRow.cs | 6 +++--- engine/Launcher/StandaloneTest/Widgets/ProjectRow.cs | 10 ++++------ .../StandaloneTest/Widgets/ProjectTemplates.cs | 2 +- engine/Sandbox.Tools/Editor/EditorSplashScreen.cs | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/engine/Launcher/StandaloneTest/Widgets/HomeWidget.cs b/engine/Launcher/StandaloneTest/Widgets/HomeWidget.cs index 7c6ce074..e1b4c0ab 100644 --- a/engine/Launcher/StandaloneTest/Widgets/HomeWidget.cs +++ b/engine/Launcher/StandaloneTest/Widgets/HomeWidget.cs @@ -74,8 +74,8 @@ public class HomeWidget : Widget Sort = _sort; { - var search = menuRow.Add( new LineEdit() { PlaceholderText = "⌕ Search" }, 2 ); - search.SetStyles( "border-radius: 3px;" ); + var search = menuRow.Add( new LineEdit() { PlaceholderText = "⌕ Search" }, 1 ); + search.SetStyles( $"border: 1px solid {Theme.ButtonBackground.Hex};" ); search.TextChanged += _ => { Filter = search.Value; @@ -84,7 +84,6 @@ public class HomeWidget : Widget search.Blur(); } - menuRow.AddStretchCell( 1 ); //menuRow.Add( new IconButton( "cloud_download" ) //{ // OnClick = ProjectDownload.OpenWindow, diff --git a/engine/Launcher/StandaloneTest/Widgets/ItemRow.cs b/engine/Launcher/StandaloneTest/Widgets/ItemRow.cs index d91bad85..cc9edcf0 100644 --- a/engine/Launcher/StandaloneTest/Widgets/ItemRow.cs +++ b/engine/Launcher/StandaloneTest/Widgets/ItemRow.cs @@ -155,16 +155,16 @@ public partial class ItemRow : Widget r.Right = LocalRect.Width - ButtonLayoutWidth; - x = Paint.DrawIcon( r, Icon, 12.0f, TextFlag.LeftTop ); + x = Paint.DrawIcon( r, Icon, 12.0f, TextFlag.LeftCenter ); r.Left = x.Right + 4; - x = Paint.DrawText( r, Text, TextFlag.LeftTop ); + x = Paint.DrawText( r, Text, TextFlag.LeftCenter ); r.Left = x.Right + 4; if ( i != Info.Count - 1 ) { // ascii bullet separator - x = Paint.DrawText( r, "•", TextFlag.LeftTop ); + x = Paint.DrawText( r, "•", TextFlag.LeftCenter ); r.Left = x.Right + 4; } } diff --git a/engine/Launcher/StandaloneTest/Widgets/ProjectRow.cs b/engine/Launcher/StandaloneTest/Widgets/ProjectRow.cs index febfcc86..a40ed68d 100644 --- a/engine/Launcher/StandaloneTest/Widgets/ProjectRow.cs +++ b/engine/Launcher/StandaloneTest/Widgets/ProjectRow.cs @@ -81,9 +81,9 @@ public partial class ProjectRow : ItemRow Paint.Antialiasing = true; Paint.ClearPen(); - Paint.SetPen( Theme.SurfaceLightBackground ); - if ( Paint.HasMouseOver ) + Paint.SetPen( Theme.Text ); + else Paint.SetPen( Theme.TextLight ); Paint.DrawIcon( MoreButton.LocalRect, "more_vert", 16.0f ); @@ -108,12 +108,10 @@ public partial class ProjectRow : ItemRow Paint.Antialiasing = true; Paint.ClearPen(); - if ( Project.Pinned ) + if ( Project.Pinned || Paint.HasMouseOver ) Paint.SetPen( Theme.Text ); - else if ( Paint.HasMouseOver ) - Paint.SetPen( Theme.TextLight ); else - Paint.SetPen( Theme.SurfaceLightBackground ); + Paint.SetPen( Theme.TextLight ); Paint.DrawIcon( PinButton.LocalRect, "push_pin", 16.0f ); diff --git a/engine/Launcher/StandaloneTest/Widgets/ProjectTemplates.cs b/engine/Launcher/StandaloneTest/Widgets/ProjectTemplates.cs index 8e41b73a..852cbc49 100644 --- a/engine/Launcher/StandaloneTest/Widgets/ProjectTemplates.cs +++ b/engine/Launcher/StandaloneTest/Widgets/ProjectTemplates.cs @@ -151,7 +151,7 @@ internal class ProjectTemplatesListView : ListView r.Right = rect.Width; - x = Paint.DrawText( r, template.Description, TextFlag.LeftTop ); + x = Paint.DrawText( r, template.Description, TextFlag.LeftCenter ); r.Left = x.Right + 4; } } diff --git a/engine/Sandbox.Tools/Editor/EditorSplashScreen.cs b/engine/Sandbox.Tools/Editor/EditorSplashScreen.cs index 7c38c967..ef46a32c 100644 --- a/engine/Sandbox.Tools/Editor/EditorSplashScreen.cs +++ b/engine/Sandbox.Tools/Editor/EditorSplashScreen.cs @@ -18,7 +18,7 @@ namespace Editor DeleteOnClose = true; WindowTitle = "Opening s&box Editor"; - SetWindowIcon( Pixmap.FromFile( "window_icon.png" ) ); + SetWindowIcon( Pixmap.FromFile( "logo_rounded.png" ) ); BackgroundImage = LoadSplashImage(); // load any saved geometry