]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix refresh button in fax machine (#41024)
authoreoineoineoin <helloworld@eoinrul.es>
Tue, 21 Oct 2025 22:01:22 +0000 (23:01 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 22:01:22 +0000 (22:01 +0000)
Content.Client/Fax/UI/FaxWindow.xaml
Content.Client/Stylesheets/CommonStylesheet.cs
Content.Client/Stylesheets/SheetletConfigs/IIconConfig.cs
Content.Client/Stylesheets/Sheetlets/ButtonSheetlet.cs
Content.Client/Stylesheets/StyleClass.cs
Content.Client/Stylesheets/StyleNano.cs

index 04b297ab92521e3e264bc902a037a70e6db9d8eb..4161c1e307e28cc72160769ceab1442ea9ec9ea8 100644 (file)
@@ -56,7 +56,7 @@
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center"
                                 Scale="0.9 0.9"
-                                StyleClasses="Refresh" />
+                                StyleClasses="RefreshButton" />
                          </Button>
                    </BoxContainer>
                 </BoxContainer>
index 671ce0b18a4a4950b3aa4cd0153d33ca68b51886..d7634e68ebaf8f35e74435b235d27be387c530c9 100644 (file)
@@ -48,6 +48,7 @@ public abstract class CommonStylesheet : PalettedStylesheet, IButtonConfig, IWin
 
     ResPath IIconConfig.HelpIconPath => new("help.png");
     ResPath IIconConfig.CrossIconPath => new("cross.svg.png");
+    ResPath IIconConfig.RefreshIconPath => new("circular_arrow.svg.96dpi.png");
     ResPath IIconConfig.InvertedTriangleIconPath => new("inverted_triangle.svg.png");
 
     ResPath IWindowConfig.WindowHeaderTexturePath => new("window_header.png");
index b7ab56c2832ea834dcc0d4e8605b3f5e087a018a..837e5f88d4d0fd824831d6ff62991e1f607ae2b0 100644 (file)
@@ -6,7 +6,6 @@ public interface IIconConfig : ISheetletConfig
 {
     public ResPath HelpIconPath { get; }
     public ResPath CrossIconPath { get; }
+    public ResPath RefreshIconPath { get; }
     public ResPath InvertedTriangleIconPath { get; }
-
-
 }
index bb281090668d74af6391e31284f2f525d50467e2..51ba2063928f472f48dc707fcae808908a584c5d 100644 (file)
@@ -18,6 +18,7 @@ public sealed class ButtonSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet
         IIconConfig iconCfg = sheet;
 
         var crossTex = sheet.GetTextureOr(iconCfg.CrossIconPath, NanotrasenStylesheet.TextureRoot);
+        var refreshTex = sheet.GetTextureOr(iconCfg.RefreshIconPath, NanotrasenStylesheet.TextureRoot);
 
         var rules = new List<StyleRule>
         {
@@ -50,6 +51,11 @@ public sealed class ButtonSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet
                 .Class(StyleClass.CrossButtonRed)
                 .Prop(TextureButton.StylePropertyTexture, crossTex),
 
+            // Refresh Button
+            E<TextureButton>()
+                .Class(StyleClass.RefreshButton)
+                .Prop(TextureButton.StylePropertyTexture, refreshTex),
+
             // Ensure labels in buttons are aligned.
             E<Label>()
                 // ReSharper disable once AccessToStaticMemberViaDerivedType
index 57f7c229aeadb0654000cd6af7e55759a5b62b55..4a1082751bd619035d5edd9122a061774fd7dca5 100644 (file)
@@ -1,4 +1,4 @@
-namespace Content.Client.Stylesheets;
+namespace Content.Client.Stylesheets;
 
 ///
 /// <summary>
@@ -56,6 +56,7 @@ public static class StyleClass
     public const string ButtonBig = "ButtonBig";
 
     public const string CrossButtonRed = "CrossButtonRed";
+    public const string RefreshButton = "RefreshButton";
 
     public const string ItemStatus = "ItemStatus";
     public const string ItemStatusNotHeld = "ItemStatusNotHeld";
index 9bfe5841f2d972463836970b24aa1f48830a1424..74aca61442d5c8bfd4b4eda455e3454d85c726c2 100644 (file)
@@ -1610,9 +1610,6 @@ namespace Content.Client.Stylesheets
                 Element<TextureButton>().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover)
                     .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#753131")),
 
-                //
-                Element<TextureButton>().Class("Refresh")
-                    .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Nano/circular_arrow.svg.96dpi.png")),
                 // ---
 
                 // Profile Editor