diff --git a/OpenUtau.Core/Commands/TrackCommands.cs b/OpenUtau.Core/Commands/TrackCommands.cs
index 7b9ce3449..7d2eb1718 100644
--- a/OpenUtau.Core/Commands/TrackCommands.cs
+++ b/OpenUtau.Core/Commands/TrackCommands.cs
@@ -100,6 +100,19 @@ public RenameTrackCommand(UProject project, UTrack track, string name) {
public override void Unexecute() => track.TrackName = oldName;
}
+ public class ChangeTrackColorCommand : TrackCommand {
+ readonly string newName, oldName;
+ public ChangeTrackColorCommand(UProject project, UTrack track, string colorName) {
+ this.project = project;
+ this.track = track;
+ newName = colorName;
+ oldName = track.TrackColor;
+ }
+ public override string ToString() => "Change track color";
+ public override void Execute() => track.TrackColor = newName;
+ public override void Unexecute() => track.TrackColor = oldName;
+ }
+
public class TrackChangeSingerCommand : TrackCommand {
readonly USinger newSinger, oldSinger;
public TrackChangeSingerCommand(UProject project, UTrack track, USinger newSinger) {
diff --git a/OpenUtau.Core/Ustx/UTrack.cs b/OpenUtau.Core/Ustx/UTrack.cs
index cc28cf7db..a0835b3eb 100644
--- a/OpenUtau.Core/Ustx/UTrack.cs
+++ b/OpenUtau.Core/Ustx/UTrack.cs
@@ -88,6 +88,7 @@ public USinger Singer {
[YamlIgnore] public string SingerName => Singer != null ? Singer.DisplayName : "[No Singer]";
[YamlIgnore] public int TrackNo { set; get; }
public string TrackName { get; set; } = "New Track";
+ public string TrackColor { get; set; } = "Blue";
[YamlIgnore] public bool Muted { set; get; }
public bool Mute { get; set; }
public bool Solo { get; set; }
diff --git a/OpenUtau.Core/Util/Preferences.cs b/OpenUtau.Core/Util/Preferences.cs
index 6ff770afe..62543329f 100644
--- a/OpenUtau.Core/Util/Preferences.cs
+++ b/OpenUtau.Core/Util/Preferences.cs
@@ -112,6 +112,7 @@ public class SerializablePreferences {
public bool ShowPrefs = true;
public bool ShowTips = true;
public int Theme;
+ public bool UseTrackColor = false;
public bool PreRender = true;
public int NumRenderThreads = 2;
public string OnnxRunner = string.Empty;
diff --git a/OpenUtau/Colors/Brushes.axaml b/OpenUtau/Colors/Brushes.axaml
index 0abc93f6f..78f18d7ae 100644
--- a/OpenUtau/Colors/Brushes.axaml
+++ b/OpenUtau/Colors/Brushes.axaml
@@ -106,6 +106,14 @@
Color="{DynamicResource AccentColor3}" />
+
+
+
+
diff --git a/OpenUtau/Colors/DarkTheme.axaml b/OpenUtau/Colors/DarkTheme.axaml
index a68d29092..44985b3f1 100644
--- a/OpenUtau/Colors/DarkTheme.axaml
+++ b/OpenUtau/Colors/DarkTheme.axaml
@@ -18,9 +18,9 @@
#4EA6EA
- #4EA6EA
+ #90CAF9
- #4EA6EA
+ #1E88E5
#808080
#A0A0A0
diff --git a/OpenUtau/Colors/LightTheme.axaml b/OpenUtau/Colors/LightTheme.axaml
index 602250e28..7ee011f56 100644
--- a/OpenUtau/Colors/LightTheme.axaml
+++ b/OpenUtau/Colors/LightTheme.axaml
@@ -18,9 +18,9 @@
#4EA6EA
- #4EA6EA
+ #90CAF9
- #4EA6EA
+ #1E88E5
#ADA1B3
#948A99
diff --git a/OpenUtau/Controls/TrackHeader.axaml b/OpenUtau/Controls/TrackHeader.axaml
index 67cf6970e..62b43053e 100644
--- a/OpenUtau/Controls/TrackHeader.axaml
+++ b/OpenUtau/Controls/TrackHeader.axaml
@@ -12,10 +12,31 @@
+ -->
+
+
+ -->
+
+
+
-
-
+
+
+
@@ -26,10 +47,10 @@
Text="{Binding TrackNo}" Foreground="White" VerticalAlignment="Center"/>
-
-
-
-
-
@@ -93,7 +114,7 @@
-
@@ -105,7 +126,7 @@
-
-
+
@@ -147,6 +168,7 @@
+
diff --git a/OpenUtau/OpenUtau.csproj b/OpenUtau/OpenUtau.csproj
index ca6c323e4..330342be0 100644
--- a/OpenUtau/OpenUtau.csproj
+++ b/OpenUtau/OpenUtau.csproj
@@ -82,6 +82,9 @@
TrackSettingsDialog.axaml
+
+ TrackColorDialog.axaml
+
diff --git a/OpenUtau/Strings/Strings.axaml b/OpenUtau/Strings/Strings.axaml
index 69a91a805..ace90f2c6 100644
--- a/OpenUtau/Strings/Strings.axaml
+++ b/OpenUtau/Strings/Strings.axaml
@@ -264,6 +264,7 @@ Warning: this option removes custom presets.
Theme
Dark
Light
+ Use track color in UI
Preferences
Note: please restart OpenUtau after changing this item.
Off
@@ -405,6 +406,7 @@ General
Solo additionally (which not removes solo from other tracks)
Solo this only (which removes solo from other tracks)
Unsolo all
+ Change track color
Segoe UI,San Francisco,Helvetica Neue
Microsoft YaHei,Simsun,苹方-简,宋体-简
diff --git a/OpenUtau/Strings/Strings.ja-JP.axaml b/OpenUtau/Strings/Strings.ja-JP.axaml
index 8d248da39..cee266ddd 100644
--- a/OpenUtau/Strings/Strings.ja-JP.axaml
+++ b/OpenUtau/Strings/Strings.ja-JP.axaml
@@ -263,6 +263,7 @@
テーマ
ダーク
ライト
+ UIにトラックカラーを使用する
環境設定
Note: この設定を変更した後は、OpenUtauを再起動してください。
オフ
@@ -404,6 +405,7 @@
ソロ (他トラックのソロを解除しない)
ソロ (他トラックのソロを解除)
全トラックのソロを解除
+ トラックカラーを変更
Meiryo UI,Hiragino Sans,Segoe UI,San Francisco,Helvetica Neue
diff --git a/OpenUtau/Styles/PianoRollStyles.axaml b/OpenUtau/Styles/PianoRollStyles.axaml
new file mode 100644
index 000000000..69d961a20
--- /dev/null
+++ b/OpenUtau/Styles/PianoRollStyles.axaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenUtau/ThemeManager.cs b/OpenUtau/ThemeManager.cs
index 40322415d..5b2918dd0 100644
--- a/OpenUtau/ThemeManager.cs
+++ b/OpenUtau/ThemeManager.cs
@@ -1,4 +1,6 @@
-using Avalonia;
+using System.Collections.Generic;
+using System.Linq;
+using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Styling;
@@ -48,6 +50,27 @@ class ThemeManager {
public static IBrush ExpActiveBrush = Brushes.Black;
public static IBrush ExpActiveNameBrush = Brushes.White;
+ public static List TrackColors = new List(){
+ new TrackColor("Pink", "#F06292", "#E91E63", "#F48FB1"),
+ new TrackColor("Red", "#EF5350", "#E53935", "#E57373"),
+ new TrackColor("Orange", "#FF8A65", "#FF5722", "#FFAB91"),
+ new TrackColor("Yellow", "#FBC02D", "#F9A825", "#FDD835"),
+ new TrackColor("Light Green", "#CDDC39", "#AFB42B", "#DCE775"),
+ new TrackColor("Green", "#66BB6A", "#43A047", "#A5D6A7"),
+ new TrackColor("Light Blue", "#4FC3F7", "#03A9F4", "#81D4FA"),
+ new TrackColor("Blue", "#4EA6EA", "#1E88E5", "#90CAF9"),
+ new TrackColor("Purple", "#BA68C8", "#9C27B0", "#CE93D8"),
+ new TrackColor("Pink2", "#E91E63", "#C2185B", "#F06292"),
+ new TrackColor("Red2", "#D32F2F", "#B71C1C", "#EF5350"),
+ new TrackColor("Orange2", "#FF5722", "#E64A19", "#FF8A65"),
+ new TrackColor("Yellow2", "#FF8F00", "#FF6F00", "#FFB300"),
+ new TrackColor("Light Green2", "#AFB42B", "#827717", "#CDDC39"),
+ new TrackColor("Green2", "#2E7D32", "#1B5E20", "#4CAF50"),
+ new TrackColor("Light Blue2", "#1976D2", "#0D47A1", "#2196F3"),
+ new TrackColor("Blue2", "#3949AB", "#283593", "#5C6BC0"),
+ new TrackColor("Purple2", "#7B1FA2", "#4A148C", "#9C27B0"),
+ };
+
public static void LoadTheme() {
if (Application.Current == null) {
return;
@@ -149,6 +172,20 @@ public static void LoadTheme() {
MessageBus.Current.SendMessage(new ThemeChangedEvent());
}
+ public static void ChangeTrackColor(string color) {
+ if (Application.Current == null) {
+ return;
+ }
+ try {
+ IResourceDictionary resDict = Application.Current.Resources;
+ TrackColor tcolor = GetTrackColor(color);
+ resDict["SelectedTrackAccentBrush"] = tcolor.AccentColor;
+ resDict["SelectedTrackAccentLightBrush"] = tcolor.AccentColorLight;
+ resDict["SelectedTrackAccentLightBrushSemi"] = tcolor.AccentColorLightSemi;
+ resDict["SelectedTrackAccentDarkBrush"] = tcolor.AccentColorDark;
+ } catch { }
+ }
+
public static string GetString(string key) {
if (Application.Current == null) {
return key;
@@ -159,5 +196,29 @@ public static string GetString(string key) {
}
return key;
}
+
+ public static TrackColor GetTrackColor(string name) {
+ if (TrackColors.Any(c => c.Name == name)) {
+ return TrackColors.First(c => c.Name == name);
+ }
+ return TrackColors.First(c => c.Name == "Blue");
+ }
+ }
+
+ public class TrackColor {
+ public string Name { get; set; } = "";
+ public SolidColorBrush AccentColor { get; set; }
+ public SolidColorBrush AccentColorDark { get; set; } // Pressed
+ public SolidColorBrush AccentColorLight { get; set; } // PointerOver
+ public SolidColorBrush AccentColorLightSemi { get; set; } // BackGround
+
+ public TrackColor(string name, string accentColor, string darkColor, string lightColor) {
+ Name = name;
+ AccentColor = SolidColorBrush.Parse(accentColor);
+ AccentColorDark = SolidColorBrush.Parse(darkColor);
+ AccentColorLight = SolidColorBrush.Parse(lightColor);
+ AccentColorLightSemi = SolidColorBrush.Parse(lightColor);
+ AccentColorLightSemi.Opacity = 0.5;
+ }
}
}
diff --git a/OpenUtau/ViewModels/NotePropertiesViewModel.cs b/OpenUtau/ViewModels/NotePropertiesViewModel.cs
index 51884565d..596a010cf 100644
--- a/OpenUtau/ViewModels/NotePropertiesViewModel.cs
+++ b/OpenUtau/ViewModels/NotePropertiesViewModel.cs
@@ -206,44 +206,48 @@ public void OnNext(UCommand cmd, bool isUndo) {
var note = selectedNotes.FirstOrDefault();
if (note == null) { return; }
- if (cmd is ChangeNoteLyricCommand changeNoteLyricCommand) {
- if (changeNoteLyricCommand.Notes.Contains(note)) {
- Lyric = note.lyric;
- }
- } else if (cmd is VibratoLengthCommand vibratoLengthCommand) {
- if (vibratoLengthCommand.Notes.Contains(note)) {
- if (note.vibrato.length == 0) {
- VibratoEnable = false;
- VibratoLength = NotePresets.Default.DefaultVibrato.VibratoLength;
- } else {
- VibratoEnable = true;
- VibratoLength = note.vibrato.length;
+ if (cmd is NoteCommand) {
+ if (cmd is ChangeNoteLyricCommand changeNoteLyricCommand) {
+ if (changeNoteLyricCommand.Notes.Contains(note)) {
+ Lyric = note.lyric;
+ }
+ } else if (cmd is VibratoLengthCommand vibratoLengthCommand) {
+ if (vibratoLengthCommand.Notes.Contains(note)) {
+ if (note.vibrato.length == 0) {
+ VibratoEnable = false;
+ VibratoLength = NotePresets.Default.DefaultVibrato.VibratoLength;
+ } else {
+ VibratoEnable = true;
+ VibratoLength = note.vibrato.length;
+ }
+ }
+ } else if (cmd is VibratoFadeInCommand vibratoFadeInCommand) {
+ if (vibratoFadeInCommand.Notes.Contains(note)) {
+ VibratoIn = note.vibrato.@in;
+ }
+ } else if (cmd is VibratoFadeOutCommand vibratoFadeOutCommand) {
+ if (vibratoFadeOutCommand.Notes.Contains(note)) {
+ VibratoOut = note.vibrato.@out;
+ }
+ } else if (cmd is VibratoDepthCommand vibratoDepthCommand) {
+ if (vibratoDepthCommand.Notes.Contains(note)) {
+ VibratoDepth = note.vibrato.depth;
+ }
+ } else if (cmd is VibratoPeriodCommand vibratoPeriodCommand) {
+ if (vibratoPeriodCommand.Notes.Contains(note)) {
+ VibratoPeriod = note.vibrato.period;
+ }
+ } else if (cmd is VibratoShiftCommand vibratoShiftCommand) {
+ if (vibratoShiftCommand.Notes.Contains(note)) {
+ VibratoShift = note.vibrato.shift;
}
}
- } else if (cmd is VibratoFadeInCommand vibratoFadeInCommand) {
- if (vibratoFadeInCommand.Notes.Contains(note)) {
- VibratoIn = note.vibrato.@in;
- }
- } else if (cmd is VibratoFadeOutCommand vibratoFadeOutCommand) {
- if (vibratoFadeOutCommand.Notes.Contains(note)) {
- VibratoOut = note.vibrato.@out;
- }
- } else if (cmd is VibratoDepthCommand vibratoDepthCommand) {
- if (vibratoDepthCommand.Notes.Contains(note)) {
- VibratoDepth = note.vibrato.depth;
- }
- } else if (cmd is VibratoPeriodCommand vibratoPeriodCommand) {
- if (vibratoPeriodCommand.Notes.Contains(note)) {
- VibratoPeriod = note.vibrato.period;
- }
- } else if (cmd is VibratoShiftCommand vibratoShiftCommand) {
- if (vibratoShiftCommand.Notes.Contains(note)) {
- VibratoShift = note.vibrato.shift;
+ } else if (cmd is ExpCommand) {
+ if (cmd is PitchExpCommand pitchExpCommand) {
+ //
+ } else if (cmd is SetPhonemeExpressionCommand || cmd is ResetExpressionsCommand) {
+ AttachExpressions();
}
- } else if (cmd is PitchExpCommand pitchExpCommand) {
- //
- } else if (cmd is SetPhonemeExpressionCommand || cmd is ResetExpressionsCommand) {
- AttachExpressions();
}
}
#endregion
diff --git a/OpenUtau/ViewModels/NotesViewModel.cs b/OpenUtau/ViewModels/NotesViewModel.cs
index 3751b884e..a1e77596f 100644
--- a/OpenUtau/ViewModels/NotesViewModel.cs
+++ b/OpenUtau/ViewModels/NotesViewModel.cs
@@ -74,6 +74,7 @@ public class NotesViewModel : ViewModelBase, ICmdSubscriber {
[Reactive] public Bitmap? Portrait { get; set; }
[Reactive] public IBrush? PortraitMask { get; set; }
[Reactive] public string WindowTitle { get; set; } = "Piano Roll";
+ [Reactive] public SolidColorBrush TrackAccentColor { get; set; } = ThemeManager.GetTrackColor("Blue").AccentColor;
public double ViewportTicks => viewportTicks.Value;
public double ViewportTracks => viewportTracks.Value;
public double SmallChangeX => smallChangeX.Value;
@@ -374,6 +375,7 @@ private void LoadPart(UPart part, UProject project) {
OnPartModified();
LoadPortrait(part, project);
LoadWindowTitle(part, project);
+ LoadTrackColor(part, project);
}
private void LoadPortrait(UPart? part, UProject? project) {
@@ -435,6 +437,19 @@ private void LoadWindowTitle(UPart? part, UProject? project) {
WindowTitle = project.tracks[part.trackNo].TrackName + " - " + part.DisplayName;
}
+ private void LoadTrackColor(UPart? part, UProject? project) {
+ if (part == null || project == null) {
+ TrackAccentColor = ThemeManager.GetTrackColor("Blue").AccentColor;
+ ThemeManager.ChangeTrackColor("Blue");
+ return;
+ }
+ TrackAccentColor = ThemeManager.GetTrackColor(project.tracks[part.trackNo].TrackColor).AccentColor;
+ string name = Preferences.Default.UseTrackColor
+ ? project.tracks[part.trackNo].TrackColor
+ : "Blue";
+ ThemeManager.ChangeTrackColor(name);
+ }
+
private void UnloadPart() {
DeselectNotes();
Part = null;
@@ -868,6 +883,9 @@ public void OnNext(UCommand cmd, bool isUndo) {
if (cmd is RenameTrackCommand) {
LoadWindowTitle(Part, Project);
return;
+ } else if (cmd is ChangeTrackColorCommand) {
+ LoadTrackColor(Part, Project);
+ return;
} else if (cmd is RemoveTrackCommand removeTrack) {
if (Part != null && removeTrack.removedParts.Contains(Part)) {
UnloadPart();
diff --git a/OpenUtau/ViewModels/PreferencesViewModel.cs b/OpenUtau/ViewModels/PreferencesViewModel.cs
index 14f2aca99..0fbf254a9 100644
--- a/OpenUtau/ViewModels/PreferencesViewModel.cs
+++ b/OpenUtau/ViewModels/PreferencesViewModel.cs
@@ -36,6 +36,7 @@ public AudioOutputDevice? AudioOutputDevice {
[Reactive] public GpuInfo OnnxGpu { get; set; }
[Reactive] public bool HighThreads { get; set; }
[Reactive] public int Theme { get; set; }
+ [Reactive] public bool UseTrackColor { get; set; }
[Reactive] public bool ShowPortrait { get; set; }
[Reactive] public bool ShowGhostNotes { get; set; }
[Reactive] public int OtoEditor { get; set; }
@@ -122,6 +123,7 @@ public PreferencesViewModel() {
OnnxGpuOptions = Onnx.getGpuInfo();
OnnxGpu = OnnxGpuOptions.FirstOrDefault(x => x.deviceId == Preferences.Default.OnnxGpu, OnnxGpuOptions[0]);
Theme = Preferences.Default.Theme;
+ UseTrackColor = Preferences.Default.UseTrackColor;
ShowPortrait = Preferences.Default.ShowPortrait;
ShowGhostNotes = Preferences.Default.ShowGhostNotes;
Beta = Preferences.Default.Beta;
@@ -191,6 +193,11 @@ public PreferencesViewModel() {
Preferences.Save();
App.SetTheme();
});
+ this.WhenAnyValue(vm => vm.UseTrackColor)
+ .Subscribe(trackColor => {
+ Preferences.Default.UseTrackColor = trackColor;
+ Preferences.Save();
+ });
this.WhenAnyValue(vm => vm.ShowPortrait)
.Subscribe(showPortrait => {
Preferences.Default.ShowPortrait = showPortrait;
diff --git a/OpenUtau/ViewModels/TrackColorViewModel.cs b/OpenUtau/ViewModels/TrackColorViewModel.cs
new file mode 100644
index 000000000..3e2eab80d
--- /dev/null
+++ b/OpenUtau/ViewModels/TrackColorViewModel.cs
@@ -0,0 +1,26 @@
+using System.Collections.ObjectModel;
+using System.Linq;
+using OpenUtau.Core;
+using OpenUtau.Core.Ustx;
+using ReactiveUI.Fody.Helpers;
+
+namespace OpenUtau.App.ViewModels {
+ public class TrackColorViewModel : ViewModelBase {
+ public ObservableCollection TrackColors { get; } = new ObservableCollection(ThemeManager.TrackColors);
+ [Reactive] public TrackColor SelectedColor { get; set; }
+ private UTrack track;
+
+ public TrackColorViewModel(UTrack track) {
+ SelectedColor = TrackColors.FirstOrDefault(c => c.Name == track.TrackColor) ?? TrackColors.First(c => c.Name == "Blue");
+ this.track = track;
+ }
+
+ public void Finish() {
+ if(SelectedColor.Name != track.TrackColor) {
+ DocManager.Inst.StartUndoGroup();
+ DocManager.Inst.ExecuteCmd(new ChangeTrackColorCommand(DocManager.Inst.Project, track, SelectedColor.Name));
+ DocManager.Inst.EndUndoGroup();
+ }
+ }
+ }
+}
diff --git a/OpenUtau/ViewModels/TrackHeaderViewModel.cs b/OpenUtau/ViewModels/TrackHeaderViewModel.cs
index c37d5b005..c5e323278 100644
--- a/OpenUtau/ViewModels/TrackHeaderViewModel.cs
+++ b/OpenUtau/ViewModels/TrackHeaderViewModel.cs
@@ -8,7 +8,9 @@
using System.Threading;
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Media;
using Avalonia.Media.Imaging;
+using Avalonia.Styling;
using OpenUtau.Api;
using OpenUtau.App.Views;
using OpenUtau.Core;
@@ -32,6 +34,8 @@ public class TrackHeaderViewModel : ViewModelBase, IActivatableViewModel {
public IReadOnlyList? RenderersMenuItems { get; set; }
public ReactiveCommand SelectRendererCommand { get; }
[Reactive] public string TrackName { get; set; } = string.Empty;
+ [Reactive] public SolidColorBrush TrackAccentColor { get; set; } = ThemeManager.GetTrackColor("Blue").AccentColor;
+ [Reactive] public TrackColor TrackColor { get; set; } = ThemeManager.GetTrackColor("Blue");
[Reactive] public double Volume { get; set; }
[Reactive] public double Pan { get; set; }
[Reactive] public bool Mute { get; set; }
@@ -130,6 +134,10 @@ public TrackHeaderViewModel(UTrack track) {
});
TrackName = track.TrackName;
+ TrackAccentColor = ThemeManager.GetTrackColor(track.TrackColor).AccentColor;
+ TrackColor = Preferences.Default.UseTrackColor
+ ? ThemeManager.GetTrackColor(track.TrackColor)
+ : ThemeManager.GetTrackColor("Blue");
Volume = track.Volume;
Pan = track.Pan;
Mute = track.Mute;
@@ -375,6 +383,19 @@ public void Rename() {
}
}
+ public async void SelectTrackColor() {
+ var dialog = new TrackColorDialog();
+ dialog.DataContext = new TrackColorViewModel(track);
+
+ if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop && desktop.MainWindow != null) {
+ await dialog.ShowDialog(desktop.MainWindow);
+ TrackAccentColor = ThemeManager.GetTrackColor(track.TrackColor).AccentColor;
+ TrackColor = Preferences.Default.UseTrackColor
+ ? ThemeManager.GetTrackColor(track.TrackColor)
+ : ThemeManager.GetTrackColor("Blue");
+ }
+ }
+
public void Duplicate() {
DocManager.Inst.StartUndoGroup();
//TODO
@@ -388,6 +409,7 @@ public void Duplicate() {
Solo = track.Solo,
Volume = track.Volume,
Pan = track.Pan,
+ TrackColor = track.TrackColor
};
DocManager.Inst.ExecuteCmd(new AddTrackCommand(DocManager.Inst.Project, newTrack));
var parts = DocManager.Inst.Project.parts
@@ -413,6 +435,7 @@ public void DuplicateSettings() {
Solo = track.Solo,
Volume = track.Volume,
Pan = track.Pan,
+ TrackColor = track.TrackColor
}));
DocManager.Inst.EndUndoGroup();
}
diff --git a/OpenUtau/Views/LyricsDialog.axaml b/OpenUtau/Views/LyricsDialog.axaml
index 53a6b7437..8019c5792 100644
--- a/OpenUtau/Views/LyricsDialog.axaml
+++ b/OpenUtau/Views/LyricsDialog.axaml
@@ -8,10 +8,13 @@
Title="{StaticResource lyrics.caption}"
KeyDown="OnKeyDown"
Opened="OnOpened">
+
+
+
+ Text="{Binding Text}" Focusable="True"/>
diff --git a/OpenUtau/Views/LyricsReplaceDialog.axaml b/OpenUtau/Views/LyricsReplaceDialog.axaml
index 7dc80be05..682f5cbba 100644
--- a/OpenUtau/Views/LyricsReplaceDialog.axaml
+++ b/OpenUtau/Views/LyricsReplaceDialog.axaml
@@ -6,6 +6,9 @@
x:Class="OpenUtau.App.Views.LyricsReplaceDialog" WindowStartupLocation="CenterOwner"
Icon="/Assets/open-utau.ico"
Title="{StaticResource lyricsreplace.replace}">
+
+
+
diff --git a/OpenUtau/Views/PianoRollWindow.axaml b/OpenUtau/Views/PianoRollWindow.axaml
index fb5cfb214..4ab9c51df 100644
--- a/OpenUtau/Views/PianoRollWindow.axaml
+++ b/OpenUtau/Views/PianoRollWindow.axaml
@@ -12,11 +12,10 @@
TransparencyLevelHint="None"
ExtendClientAreaToDecorationsHint="{Binding ExtendToFrame}" Deactivated="WindowDeactivated">
-
+
+
@@ -504,5 +503,6 @@
+
diff --git a/OpenUtau/Views/PreferencesDialog.axaml b/OpenUtau/Views/PreferencesDialog.axaml
index 299d72390..7a543b9fb 100644
--- a/OpenUtau/Views/PreferencesDialog.axaml
+++ b/OpenUtau/Views/PreferencesDialog.axaml
@@ -144,6 +144,11 @@
+
+
+
+
+
diff --git a/OpenUtau/Views/TrackColorDialog.axaml b/OpenUtau/Views/TrackColorDialog.axaml
new file mode 100644
index 000000000..5eb53f216
--- /dev/null
+++ b/OpenUtau/Views/TrackColorDialog.axaml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenUtau/Views/TrackColorDialog.axaml.cs b/OpenUtau/Views/TrackColorDialog.axaml.cs
new file mode 100644
index 000000000..abca7d945
--- /dev/null
+++ b/OpenUtau/Views/TrackColorDialog.axaml.cs
@@ -0,0 +1,37 @@
+using System;
+using Avalonia.Controls;
+using Avalonia.Input;
+using Avalonia.Interactivity;
+using Avalonia.Media;
+using OpenUtau.App.ViewModels;
+using OpenUtau.Core;
+using Org.BouncyCastle.Tls;
+
+namespace OpenUtau.App.Views {
+ public partial class TrackColorDialog : Window {
+ public TrackColorDialog() {
+ InitializeComponent();
+ }
+
+ void OnCancel(object? sender, RoutedEventArgs e) {
+ Close();
+ }
+
+ void OnFinish(object? sender, RoutedEventArgs e) {
+ (DataContext as TrackColorViewModel)!.Finish();
+ Close();
+ }
+
+ private void OnKeyDown(object? sender, KeyEventArgs e) {
+ if (e.Key == Key.Escape) {
+ e.Handled = true;
+ Close();
+ } else if (e.Key == Key.Enter) {
+ e.Handled = true;
+ OnFinish(sender, e);
+ } else {
+ base.OnKeyDown(e);
+ }
+ }
+ }
+}