From eee4b64c64eadff42914b5e227694cf6dcfbdc5f Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 23 Feb 2019 16:35:51 +0100 Subject: [PATCH] Make LineEdit not ugly as hell. --- Content.Client/UserInterface/NanoStyle.cs | 14 ++++++++++++++ Resources/Nano/lineedit.png | Bin 0 -> 161 bytes engine | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Resources/Nano/lineedit.png diff --git a/Content.Client/UserInterface/NanoStyle.cs b/Content.Client/UserInterface/NanoStyle.cs index 65c24e2069..03350fd448 100644 --- a/Content.Client/UserInterface/NanoStyle.cs +++ b/Content.Client/UserInterface/NanoStyle.cs @@ -73,6 +73,13 @@ namespace Content.Client.UserInterface buttonDisabled.SetPatchMargin(StyleBox.Margin.All, 2); buttonDisabled.SetContentMarginOverride(StyleBox.Margin.Left | StyleBox.Margin.Right, 4); + var lineEditTex = resCache.GetResource("/Nano/lineedit.png").Texture; + var lineEdit = new StyleBoxTexture + { + Texture = lineEditTex, + }; + lineEdit.SetPatchMargin(StyleBox.Margin.All, 3); + lineEdit.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5); Stylesheet = new Stylesheet(new[] { @@ -175,6 +182,13 @@ namespace Content.Client.UserInterface { new StyleProperty(BoxContainer.StylePropertySeparation, 2), }), + + // Fancy LineEdit + new StyleRule(new SelectorElement(typeof(LineEdit), null, null, null), + new[] + { + new StyleProperty(LineEdit.StylePropertyStyleBox, lineEdit), + }), }); } } diff --git a/Resources/Nano/lineedit.png b/Resources/Nano/lineedit.png new file mode 100644 index 0000000000000000000000000000000000000000..506b88b8b95e53ceb92bd95b0ea657418d98adbc GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgZSN z;uyklJvoJeDY*Fje;*$m9)l0>@5{GcR^M)H)TClz!76d#VE=o0iHHO%xjVLu(*pvw zB`|azKAV*O{LqE7M;h2SH0ZE1dP>@ga89sLw!6;6@Pb{&ale}=C(w8XPgg&ebxsLQ E01_}SOaK4? literal 0 HcmV?d00001 diff --git a/engine b/engine index b3e3066c53..2462caf25a 160000 --- a/engine +++ b/engine @@ -1 +1 @@ -Subproject commit b3e3066c53a22ec4d656861d461a4337d22cf268 +Subproject commit 2462caf25a6118bb6a9af16d296e68c9dcb2755c