From 962e87bfb839c573b5795085fc1424217b87ab09 Mon Sep 17 00:00:00 2001 From: Fengming Zhang Date: Thu, 14 May 2026 17:11:31 +0800 Subject: [PATCH 1/8] Added a simple and more easy theme-changing window --- OpenUtau/Strings/Strings.axaml | 12 +++-- OpenUtau/ViewModels/ThemeEditorViewModel.cs | 8 ++++ OpenUtau/Views/EasyThemeEditorWindow.axaml | 33 +++++++++++++ OpenUtau/Views/EasyThemeEditorWindow.axaml.cs | 47 +++++++++++++++++++ OpenUtau/Views/PreferencesDialog.axaml | 20 ++++++-- OpenUtau/Views/PreferencesDialog.axaml.cs | 4 ++ 6 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 OpenUtau/Views/EasyThemeEditorWindow.axaml create mode 100644 OpenUtau/Views/EasyThemeEditorWindow.axaml.cs diff --git a/OpenUtau/Strings/Strings.axaml b/OpenUtau/Strings/Strings.axaml index 45eb4a17a..bc47dabef 100644 --- a/OpenUtau/Strings/Strings.axaml +++ b/OpenUtau/Strings/Strings.axaml @@ -149,6 +149,10 @@ Do you want to continue by splitting at the nearest position after current playh Max Batch Duration (s) One or more audio segments are very long and may consume large amount of memory when transcribing. This usually happens when the audio contains accompaniment. Still proceed? + Easy Theme Editor + Save + Cancel + Error Error Details Error loading vocoder "{0}". Please download vocoder from {1} @@ -573,6 +577,7 @@ Warning: this option removes custom presets. Dark Light Edit Custom Theme + Edit Custom Theme Colorsets Delete Custom Theme Are you sure you want to delete this theme? Create Custom Theme @@ -747,6 +752,10 @@ The voicebank may not work on another OS. Choose an encoding that make file contents look right. Singer Setup + Theme Editor + Save + Cancel + Override Alias Numerical,Options Type Left Button Draw: Set expressions @@ -827,7 +836,4 @@ General Start Template - Theme Editor - Save - Cancel diff --git a/OpenUtau/ViewModels/ThemeEditorViewModel.cs b/OpenUtau/ViewModels/ThemeEditorViewModel.cs index dd0dc0fd2..9cbca6642 100644 --- a/OpenUtau/ViewModels/ThemeEditorViewModel.cs +++ b/OpenUtau/ViewModels/ThemeEditorViewModel.cs @@ -59,6 +59,9 @@ public class ThemeEditorViewModel : ViewModelBase { [Reactive] public Color BlackKeyColorRight { get; set; } [Reactive] public Color BlackKeyNameColor { get; set; } + [Reactive] public Color MainColorA { get; set; } + [Reactive] public Color MainColorB { get; set; } + public ThemeEditorViewModel(string customThemePath) { this.customThemePath = customThemePath; @@ -221,6 +224,11 @@ public ThemeEditorViewModel(string customThemePath) { this.WhenAnyValue(vm => vm.BlackKeyNameColor) .Subscribe(v => Application.Current!.Resources["BlackKeyNameColor"] = v); + + this.WhenAnyValue(vm => vm.MainColorA) + .Subscribe(v => { + Application.Current!.Resources["BlackKeyNameColor"] = v; + }); } public void Save() { diff --git a/OpenUtau/Views/EasyThemeEditorWindow.axaml b/OpenUtau/Views/EasyThemeEditorWindow.axaml new file mode 100644 index 000000000..37fb271fb --- /dev/null +++ b/OpenUtau/Views/EasyThemeEditorWindow.axaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - -