From 2082072532dce1d86ce4c9105ba4c64e328cc33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Marchal?= Date: Sun, 8 Jun 2025 01:29:22 +0200 Subject: [PATCH] Windows 11 design compatibility --- Views/MainWindow.xaml | 10 +++++----- Views/Radios.xaml | 4 ++-- Views/Radios.xaml.cs | 7 +++++++ Views/Settings.xaml | 16 ++++++++-------- Views/Settings.xaml.cs | 7 +++++++ Views/Shuffle.xaml | 8 ++++---- Views/Shuffle.xaml.cs | 7 +++++++ 7 files changed, 40 insertions(+), 19 deletions(-) diff --git a/Views/MainWindow.xaml b/Views/MainWindow.xaml index deb42ea..38ca78c 100644 --- a/Views/MainWindow.xaml +++ b/Views/MainWindow.xaml @@ -17,7 +17,7 @@ - + @@ -114,14 +114,14 @@ @@ -139,14 +139,14 @@ diff --git a/Views/Radios.xaml b/Views/Radios.xaml index df6eedb..76ef4f8 100644 --- a/Views/Radios.xaml +++ b/Views/Radios.xaml @@ -8,13 +8,13 @@ mc:Ignorable="d" Title="Radios" Closing="Window_Closing" SizeToContent="WidthAndHeight" ResizeMode="NoResize"> - + - + diff --git a/Views/Radios.xaml.cs b/Views/Radios.xaml.cs index 5262432..ed5fa98 100644 --- a/Views/Radios.xaml.cs +++ b/Views/Radios.xaml.cs @@ -172,5 +172,12 @@ namespace unison WindowInteropHelper helper = new(this); helper.EnsureHandle(); } + + private void Window_LocationChanged(object sender, EventArgs e) + { + Properties.Settings.Default.RadiosWindowTop = Top; + Properties.Settings.Default.RadiosWindowLeft = Left; + Properties.Settings.Default.Save(); + } } } \ No newline at end of file diff --git a/Views/Settings.xaml b/Views/Settings.xaml index 8ab2618..e8589eb 100644 --- a/Views/Settings.xaml +++ b/Views/Settings.xaml @@ -25,7 +25,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -201,8 +201,8 @@ - - + + @@ -230,7 +230,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -308,7 +308,7 @@ - + diff --git a/Views/Settings.xaml.cs b/Views/Settings.xaml.cs index 19c55cd..bef8415 100644 --- a/Views/Settings.xaml.cs +++ b/Views/Settings.xaml.cs @@ -207,6 +207,13 @@ namespace unison helper.EnsureHandle(); } + private void Window_LocationChanged(object sender, EventArgs e) + { + Properties.Settings.Default.SettingsWindowTop = Top; + Properties.Settings.Default.SettingsWindowLeft = Left; + Properties.Settings.Default.Save(); + } + public void SaveSettings() { Properties.Settings.Default.mpd_host = MpdHost.Text; diff --git a/Views/Shuffle.xaml b/Views/Shuffle.xaml index 365ef20..cc8d78d 100644 --- a/Views/Shuffle.xaml +++ b/Views/Shuffle.xaml @@ -42,13 +42,13 @@ - + - + @@ -80,7 +80,7 @@ - + @@ -107,7 +107,7 @@ - + diff --git a/Views/Shuffle.xaml.cs b/Views/Shuffle.xaml.cs index 871469d..b1e8706 100644 --- a/Views/Shuffle.xaml.cs +++ b/Views/Shuffle.xaml.cs @@ -432,5 +432,12 @@ namespace unison WindowInteropHelper helper = new(this); helper.EnsureHandle(); } + + private void Window_LocationChanged(object sender, EventArgs e) + { + Properties.Settings.Default.ShuffleWindowTop = Top; + Properties.Settings.Default.ShuffleWindowLeft = Left; + Properties.Settings.Default.Save(); + } } } \ No newline at end of file