Make LineEdit not ugly as hell.

This commit is contained in:
Pieter-Jan Briers
2019-02-23 16:35:51 +01:00
parent 89a4b60f7e
commit eee4b64c64
3 changed files with 15 additions and 1 deletions

View File

@@ -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<TextureResource>("/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),
}),
});
}
}