From 27d00c6fbf2769e167d3b10a43b76b845106a0f9 Mon Sep 17 00:00:00 2001 From: Kurokitu Date: Mon, 13 May 2024 09:20:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=94=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TuneLab/GUI/Dialog.axaml.cs | 4 ++-- TuneLab/GUI/Style.cs | 4 ++++ TuneLab/Views/LyricInput.axaml.cs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/TuneLab/GUI/Dialog.axaml.cs b/TuneLab/GUI/Dialog.axaml.cs index 1123adc..4002c57 100644 --- a/TuneLab/GUI/Dialog.axaml.cs +++ b/TuneLab/GUI/Dialog.axaml.cs @@ -60,10 +60,10 @@ public Button AddButton(string text, ButtonType type) var button = new Button() { MinWidth = 96, Height = 40 }; if (type == ButtonType.Primary) - button.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = new(255, 96, 96, 192), HoveredColor = new(255, 127, 127, 255) } }); + button.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = Style.BUTTON_PRIMARY, HoveredColor = Style.BUTTON_PRIMARY_HOVER } }); if (type == ButtonType.Normal) - button.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = new(255, 58, 63, 105), HoveredColor = new(255, 85, 92, 153) } }); + button.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = Style.BUTTON_NORMAL, HoveredColor = Style.BUTTON_NORMAL_HOVER } }); button.AddContent(new() { Item = new TextItem() { Text = text }, ColorSet = new() { Color = type == ButtonType.Primary ? Colors.White : Style.LIGHT_WHITE } }); diff --git a/TuneLab/GUI/Style.cs b/TuneLab/GUI/Style.cs index e8762e9..c627ba2 100644 --- a/TuneLab/GUI/Style.cs +++ b/TuneLab/GUI/Style.cs @@ -23,4 +23,8 @@ internal static class Style public static readonly Color TEXT_LIGHT = new(255, 255, 255, 255); public static readonly Color WHITE_KEY = new(255, 39, 39, 54); public static readonly Color BLACK_KEY = new(255, 27, 27, 36); + public static readonly Color BUTTON_PRIMARY = new(255, 96, 96, 192); + public static readonly Color BUTTON_NORMAL = new(255, 58, 63, 105); + public static readonly Color BUTTON_PRIMARY_HOVER = new(255, 127, 127, 255); + public static readonly Color BUTTON_NORMAL_HOVER = new(255, 85, 92, 153); } diff --git a/TuneLab/Views/LyricInput.axaml.cs b/TuneLab/Views/LyricInput.axaml.cs index 082334e..308cbf8 100644 --- a/TuneLab/Views/LyricInput.axaml.cs +++ b/TuneLab/Views/LyricInput.axaml.cs @@ -49,7 +49,7 @@ public LyricInput() OkButtonPanel.Orientation = Orientation.Horizontal; OkButtonPanel.HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Right; var OkButton = new Button() { Width = 64, Height = 28 }; - OkButton.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = new(255, 96, 96, 192), HoveredColor = new(255, 127, 127, 255) } }); + OkButton.AddContent(new() { Item = new BorderItem() { CornerRadius = 6 }, ColorSet = new() { Color = Style.BUTTON_PRIMARY, HoveredColor = Style.BUTTON_PRIMARY_HOVER } }); OkButton.AddContent(new() { Item = new TextItem() { Text = "OK" }, ColorSet = new() { Color = Colors.White } }); OkButtonPanel.Children.Add(OkButton); ActionsPanel.Children.Add(OkButtonPanel);