From be9a67f57d957693c67d99d34c40147bb3aa2be3 Mon Sep 17 00:00:00 2001 From: Zhe Fang Date: Sun, 30 Nov 2025 10:23:31 -0500 Subject: [PATCH] chores: improve layout --- .../AlbumArtLayoutSettingsControl.xaml | 14 +- .../Controls/LyricsWindowSettingsControl.xaml | 4 - .../Models/LyricsWindowStatus.cs | 2 - .../Models/Settings/AlbumArtLayoutSettings.cs | 2 - .../BetterLyrics.WinUI3/Views/LyricsPage.xaml | 165 +----------------- .../Views/LyricsPage.xaml.cs | 90 ++++++---- 6 files changed, 64 insertions(+), 213 deletions(-) diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml index a3adeb3..8c72cb0 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Controls/AlbumArtLayoutSettingsControl.xaml @@ -16,16 +16,18 @@ - + - + + + - - - - - - - - - - - diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs index d1fb8ba..3f2893c 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/LyricsWindowStatus.cs @@ -42,8 +42,6 @@ namespace BetterLyrics.WinUI3.Models [ObservableProperty][NotifyPropertyChangedRecipients] public partial double WindowWidth { get; set; } = 800; [ObservableProperty][NotifyPropertyChangedRecipients] public partial double WindowHeight { get; set; } = 500; - [ObservableProperty][NotifyPropertyChangedRecipients] public partial bool ShowLayoutIndicator { get; set; } = false; - public LyricsWindowStatus() { UpdateMonitorNameAndBounds(); diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs index 134ada4..f4db213 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Models/Settings/AlbumArtLayoutSettings.cs @@ -8,7 +8,6 @@ namespace BetterLyrics.WinUI3.Models.Settings public partial class AlbumArtLayoutSettings : ObservableRecipient, ICloneable { [ObservableProperty][NotifyPropertyChangedRecipients] public partial TextAlignmentType SongInfoAlignmentType { get; set; } = TextAlignmentType.Left; - [ObservableProperty][NotifyPropertyChangedRecipients] public partial HorizontalAlignment AlbumArtAlignmentType { get; set; } = HorizontalAlignment.Center; [ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageRadius { get; set; } = 12; // 12 % of the cover image size [ObservableProperty][NotifyPropertyChangedRecipients] public partial int CoverImageShadowAmount { get; set; } = 12; @@ -26,7 +25,6 @@ namespace BetterLyrics.WinUI3.Models.Settings return new AlbumArtLayoutSettings { SongInfoAlignmentType = this.SongInfoAlignmentType, - AlbumArtAlignmentType = this.AlbumArtAlignmentType, CoverImageRadius = this.CoverImageRadius, CoverImageShadowAmount = this.CoverImageShadowAmount, IsAutoSongInfoFontSize = this.IsAutoSongInfoFontSize, diff --git a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsPage.xaml b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsPage.xaml index 5e2abf6..734628a 100644 --- a/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsPage.xaml +++ b/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Views/LyricsPage.xaml @@ -31,11 +31,9 @@ - - - + @@ -48,7 +46,7 @@ @@ -73,7 +71,7 @@ x:Name="AlbumArtGrid" Margin="-32" Padding="32" - HorizontalAlignment="{x:Bind ViewModel.LiveStates.LyricsWindowStatus.AlbumArtLayoutSettings.AlbumArtAlignmentType, Mode=OneWay}"> + HorizontalAlignment="{Binding ElementName=SongInfoStackPanel, Path=HorizontalAlignment, Mode=OneWay}"> @@ -187,167 +185,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -