From ff3f96e7c8a653de9a87aabd2c6e1ed9f81b5507 Mon Sep 17 00:00:00 2001 From: Tomeno Date: Mon, 15 Nov 2021 12:42:30 +0100 Subject: [PATCH] AHelp Tweaks 2 - Colored window header (#5337) Co-authored-by: T Co-authored-by: Pieter-Jan Briers --- .../Administration/UI/BwoinkWindow.xaml | 5 +++- Content.Client/Stylesheets/StyleNano.cs | 25 +++++++++++++++++- .../Interface/Nano/window_header_alert.png | Bin 0 -> 154 bytes 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Resources/Textures/Interface/Nano/window_header_alert.png diff --git a/Content.Client/Administration/UI/BwoinkWindow.xaml b/Content.Client/Administration/UI/BwoinkWindow.xaml index 3d2aec5b9b..3cdd9b0c32 100644 --- a/Content.Client/Administration/UI/BwoinkWindow.xaml +++ b/Content.Client/Administration/UI/BwoinkWindow.xaml @@ -1,6 +1,9 @@  + SetSize="400 200" + HeaderClass="windowHeaderAlert" + TitleClass="windowTitleAlert" + > diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index 55359940fd..5f92cc88c5 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -115,7 +115,7 @@ namespace Content.Client.Stylesheets var notoSansItalic12 = resCache.notoStack(variation: "Italic", size: 12); var notoSansBold12 = resCache.notoStack(variation: "Bold", size: 12); var notoSansBoldItalic12 = resCache.notoStack(variation: "BoldItalic", size: 12); - var notoSansDisplayBold14 = resCache.notoStack(variation: "Bold", display: true, size: 14); + var notoSansDisplayBold14 = resCache.notoStack(variation: "Bold", display: true, size: 14); var notoSansDisplayBold16 = resCache.notoStack(variation: "Bold", display: true, size: 16); var notoSans15 = resCache.notoStack(variation: "Regular", size: 15); var notoSans16 = resCache.notoStack(variation: "Regular", size: 16); @@ -130,6 +130,14 @@ namespace Content.Client.Stylesheets ExpandMarginBottom = 3, ContentMarginBottomOverride = 0 }; + var windowHeaderAlertTex = resCache.GetTexture("/Textures/Interface/Nano/window_header_alert.png"); + var windowHeaderAlert = new StyleBoxTexture + { + Texture = windowHeaderAlertTex, + PatchMarginBottom = 3, + ExpandMarginBottom = 3, + ContentMarginBottomOverride = 0 + }; var windowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background.png"); var windowBackground = new StyleBoxTexture { @@ -439,6 +447,14 @@ namespace Content.Client.Stylesheets new StyleProperty(Label.StylePropertyFontColor, NanoGold), new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14), }), + // Alert (white) window title. + new StyleRule( + new SelectorElement(typeof(Label), new[] {"windowTitleAlert"}, null, null), + new[] + { + new StyleProperty(Label.StylePropertyFontColor, Color.White), + new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14), + }), // Window background. new StyleRule( new SelectorElement(null, new[] {SS14Window.StyleClassWindowPanel}, null, null), @@ -486,6 +502,13 @@ namespace Content.Client.Stylesheets { new StyleProperty(PanelContainer.StylePropertyPanel, windowHeader), }), + // Alert (red) window header. + new StyleRule( + new SelectorElement(typeof(PanelContainer), new[] {"windowHeaderAlert"}, null, null), + new[] + { + new StyleProperty(PanelContainer.StylePropertyPanel, windowHeaderAlert), + }), // Shapes for the buttons. Element().Class(ContainerButton.StyleClassButton) diff --git a/Resources/Textures/Interface/Nano/window_header_alert.png b/Resources/Textures/Interface/Nano/window_header_alert.png new file mode 100644 index 0000000000000000000000000000000000000000..075c9c6ef2f9573fc0d033129c028354b5130717 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^j6lr7!3HG#Z-iQbIO&eQjtmSN`?>!lvI6;>1s;*b z3=DdTAk4@f{pUYWP_o1|q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&(PdBZ+