From d077f4276845b8404cee99ea3d13c5b41cd27741 Mon Sep 17 00:00:00 2001 From: Space Time Date: Mon, 5 Jan 2026 17:01:42 +0800 Subject: [PATCH] Refactor button styles and set UI defaults Introduced a new 'FlatActionMiniButton' style and replaced usages of 'MaterialDesignFloatingActionMiniLightButton' with it across multiple views for a consistent look. Updated the default values for ColorPrimaryName, CurrentTheme, and CurrentFontSize in UIItem. Also adjusted the order of controls in ProfilesView for improved layout. --- v2rayN/ServiceLib/Models/ConfigItems.cs | 6 +- v2rayN/v2rayN/App.xaml | 26 +++++++- v2rayN/v2rayN/Views/ClashConnectionsView.xaml | 4 +- v2rayN/v2rayN/Views/ClashProxiesView.xaml | 4 +- v2rayN/v2rayN/Views/MsgView.xaml | 4 +- v2rayN/v2rayN/Views/ProfilesSelectWindow.xaml | 2 +- v2rayN/v2rayN/Views/ProfilesView.xaml | 62 +++++++++---------- 7 files changed, 65 insertions(+), 43 deletions(-) diff --git a/v2rayN/ServiceLib/Models/ConfigItems.cs b/v2rayN/ServiceLib/Models/ConfigItems.cs index eeb88deb..4ec2e639 100644 --- a/v2rayN/ServiceLib/Models/ConfigItems.cs +++ b/v2rayN/ServiceLib/Models/ConfigItems.cs @@ -91,11 +91,11 @@ public class UIItem public int MainGirdHeight1 { get; set; } public int MainGirdHeight2 { get; set; } public EGirdOrientation MainGirdOrientation { get; set; } = EGirdOrientation.Vertical; - public string? ColorPrimaryName { get; set; } - public string? CurrentTheme { get; set; } + public string? ColorPrimaryName { get; set; } = "blue"; + public string? CurrentTheme { get; set; } = nameof(ETheme.FollowSystem); public string CurrentLanguage { get; set; } public string CurrentFontFamily { get; set; } - public int CurrentFontSize { get; set; } + public int CurrentFontSize { get; set; } = 12; public bool EnableDragDropSort { get; set; } public bool DoubleClick2Activate { get; set; } public bool AutoHideStartup { get; set; } diff --git a/v2rayN/v2rayN/App.xaml b/v2rayN/v2rayN/App.xaml index 01c206ea..8074fe00 100644 --- a/v2rayN/v2rayN/App.xaml +++ b/v2rayN/v2rayN/App.xaml @@ -115,11 +115,35 @@ TargetType="{x:Type CheckBox}"> +