]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix style on paper editing background (#41009)
authoreoineoineoin <helloworld@eoinrul.es>
Tue, 21 Oct 2025 22:21:32 +0000 (23:21 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 22:21:32 +0000 (22:21 +0000)
Content.Client/Paper/UI/PaperSheetlet.cs
Content.Client/Paper/UI/PaperWindow.xaml
Content.Client/Stylesheets/StyleNano.cs

index 2af29ded8ec5f722b57e6648cd643420431cb028..3ff645ac1fa671f4710592403963c0cca2f96260 100644 (file)
@@ -1,4 +1,4 @@
-using Content.Client.Resources;
+using Content.Client.Resources;
 using Content.Client.Stylesheets;
 using Content.Client.Stylesheets.SheetletConfigs;
 using Content.Client.Stylesheets.Stylesheets;
@@ -22,12 +22,22 @@ public sealed class PaperSheetlet : Sheetlet<NanotrasenStylesheet>
             { Texture = sheet.GetTexture(windowCfg.TransparentWindowBackgroundBorderedPath) };
         paperBox.SetPatchMargin(StyleBox.Margin.All, 2);
 
+        var borderedTransparentTex = ResCache.GetTexture("/Textures/Interface/Nano/transparent_window_background_bordered.png");
+        var borderedTransparentBackground = new StyleBoxTexture
+        {
+            Texture = borderedTransparentTex,
+        };
+        borderedTransparentBackground.SetPatchMargin(StyleBox.Margin.All, 2);
+
         return
         [
             E<PanelContainer>().Identifier("PaperContainer").Panel(paperBox),
             E<PanelContainer>()
                 .Identifier("PaperDefaultBorder")
                 .Prop(PanelContainer.StylePropertyPanel, paperBackground),
+            E<PanelContainer>()
+                .Identifier("PaperEditBackground")
+                .Prop(PanelContainer.StylePropertyPanel, borderedTransparentBackground),
         ];
     }
 }
index 8ec51e962d9fa9b320e5b540910385be5d17eb32..e3d97abc9de8466846e00baa234f12a36c254668 100644 (file)
@@ -16,7 +16,7 @@
                         <RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelWeak" VerticalAlignment="Top" HorizontalAlignment="Center"/>
                         <RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/>
                         <BoxContainer Name="InputContainer" StyleIdentifier="PaperContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
-                            <PanelContainer StyleClasses="TransparentBorderedWindowPanel" MinHeight="100"
+                            <PanelContainer StyleIdentifier="PaperEditBackground" MinHeight="100"
                                 VerticalAlignment="Stretch" VerticalExpand="True" HorizontalExpand="True">
                                 <TextEdit Name="Input" StyleClasses="PaperLineEdit" Access="Public" />
                             </PanelContainer>
index 74aca61442d5c8bfd4b4eda455e3454d85c726c2..573b83cca4dfca782362a1602a0c4245a84625b6 100644 (file)
@@ -50,7 +50,6 @@ namespace Content.Client.Stylesheets
         public const string StyleClassHandSlotHighlight = "HandSlotHighlight";
         public const string StyleClassChatPanel = "ChatPanel";
         public const string StyleClassChatSubPanel = "ChatSubPanel";
-        public const string StyleClassTransparentBorderedWindowPanel = "TransparentBorderedWindowPanel";
         public const string StyleClassHotbarPanel = "HotbarPanel";
         public const string StyleClassTooltipPanel = "tooltipBox";
         public const string StyleClassTooltipAlertTitle = "tooltipAlertTitle";
@@ -255,13 +254,6 @@ namespace Content.Client.Stylesheets
             };
             handSlotHighlight.SetPatchMargin(StyleBox.Margin.All, 2);
 
-            var borderedTransparentWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/transparent_window_background_bordered.png");
-            var borderedTransparentWindowBackground = new StyleBoxTexture
-            {
-                Texture = borderedTransparentWindowBackgroundTex,
-            };
-            borderedTransparentWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
-
             var hotbarBackground = new StyleBoxTexture
             {
                 Texture = borderedWindowBackgroundTex,
@@ -654,12 +646,6 @@ namespace Content.Client.Stylesheets
                     {
                         new StyleProperty(PanelContainer.StylePropertyPanel, borderedWindowBackground),
                     }),
-                new StyleRule(
-                    new SelectorElement(null, new[] {StyleClassTransparentBorderedWindowPanel}, null, null),
-                    new[]
-                    {
-                        new StyleProperty(PanelContainer.StylePropertyPanel, borderedTransparentWindowBackground),
-                    }),
                 // inventory slot background
                 new StyleRule(
                     new SelectorElement(null, new[] {StyleClassInventorySlotBackground}, null, null),