mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-05-19 04:17:04 -04:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user