From a84db6954c77491193d27082eb24f2175e573ed3 Mon Sep 17 00:00:00 2001 From: United600 Date: Wed, 30 Oct 2024 05:55:46 +0000 Subject: [PATCH] style: minor UI fixes (#464) * fix custom accent brushes * remove xaml ui command * fix artists page shuffle button minimal state add scrollchaining to semantic zoom * fix network page no content grid * fix titlebar text theme switching * improve player header and controls background * reorder dropdown content property and simplify method * revert AccentFillColorCustomBrush change --------- Co-authored-by: Tung Huynh --- Screenbox/Pages/AlbumsPage.xaml | 8 +++-- Screenbox/Pages/ArtistsPage.xaml | 5 +-- Screenbox/Pages/HomePage.xaml | 50 ++++++++++++----------------- Screenbox/Pages/MainPage.xaml | 10 ++++++ Screenbox/Pages/MainPage.xaml.cs | 11 +++---- Screenbox/Pages/NetworkPage.xaml | 3 +- Screenbox/Pages/PlayerPage.xaml | 55 ++++++++++++++++++++------------ Screenbox/Pages/SongsPage.xaml | 46 ++++++++++++-------------- 8 files changed, 100 insertions(+), 88 deletions(-) diff --git a/Screenbox/Pages/AlbumsPage.xaml b/Screenbox/Pages/AlbumsPage.xaml index c73afeddb..aa00278b8 100644 --- a/Screenbox/Pages/AlbumsPage.xaml +++ b/Screenbox/Pages/AlbumsPage.xaml @@ -75,6 +75,7 @@ Margin="{StaticResource ContentPagePadding}" HorizontalAlignment="Right" AccessKey="{strings:KeyboardResources Key=CommandSortByKey}" + AutomationProperties.Name="{x:Bind SortByText.Text}" Background="Transparent" BorderBrush="Transparent"> @@ -107,7 +108,7 @@ - + @@ -133,6 +134,7 @@ ItemTemplate="{StaticResource AlbumGridViewItemTemplate}" ItemsSource="{x:Bind AlbumsSource.View}" Loaded="AlbumGridView_OnLoaded" + ScrollViewer.IsHorizontalScrollChainingEnabled="False" SelectionMode="None"> - - + + diff --git a/Screenbox/Pages/ArtistsPage.xaml b/Screenbox/Pages/ArtistsPage.xaml index 4277c246f..25872640e 100644 --- a/Screenbox/Pages/ArtistsPage.xaml +++ b/Screenbox/Pages/ArtistsPage.xaml @@ -81,6 +81,7 @@ ItemTemplate="{StaticResource ArtistGridViewItemTemplate}" ItemsSource="{x:Bind ArtistsSource.View}" Loaded="ArtistGridView_OnLoaded" + ScrollViewer.IsHorizontalScrollChainingEnabled="False" SelectionMode="None"> + + - - diff --git a/Screenbox/Pages/HomePage.xaml b/Screenbox/Pages/HomePage.xaml index 62de3b280..0b7922393 100644 --- a/Screenbox/Pages/HomePage.xaml +++ b/Screenbox/Pages/HomePage.xaml @@ -23,37 +23,29 @@ - - - - - - - - - - + + - - + + + + + + + + + + + + diff --git a/Screenbox/Pages/MainPage.xaml.cs b/Screenbox/Pages/MainPage.xaml.cs index caa9aeca8..4c9f53e7d 100644 --- a/Screenbox/Pages/MainPage.xaml.cs +++ b/Screenbox/Pages/MainPage.xaml.cs @@ -81,19 +81,18 @@ private void CoreTitleBar_LayoutMetricsChanged(CoreApplicationViewTitleBar sende RightPaddingColumn.Width = new GridLength(Math.Max(sender.SystemOverlayLeftInset, sender.SystemOverlayRightInset)); } - // Update the TitleBar based on the inactive/active state of the app + /// + /// Change the depending on whether the app is active or inactive. + /// private void CoreWindow_Activated(CoreWindow sender, WindowActivatedEventArgs args) { - SolidColorBrush defaultForegroundBrush = (SolidColorBrush)Application.Current.Resources["TextFillColorPrimaryBrush"]; - SolidColorBrush inactiveForegroundBrush = (SolidColorBrush)Application.Current.Resources["TextFillColorDisabledBrush"]; - if (args.WindowActivationState == CoreWindowActivationState.Deactivated) { - AppTitleText.Foreground = inactiveForegroundBrush; + VisualStateManager.GoToState(this, "Deactivated", true); } else { - AppTitleText.Foreground = defaultForegroundBrush; + VisualStateManager.GoToState(this, "Activated", true); } } diff --git a/Screenbox/Pages/NetworkPage.xaml b/Screenbox/Pages/NetworkPage.xaml index 63060cc9c..f400d8911 100644 --- a/Screenbox/Pages/NetworkPage.xaml +++ b/Screenbox/Pages/NetworkPage.xaml @@ -47,8 +47,7 @@ #202020 #C92C2C2C 0.5 - - + + + + + + + + + + + + + + #FCFCFC #C9F9F9F9 0.45 - - + + + + + + + + + + + + + + 1 - - + 0 + + + - - - - - - - - - - - - - - - - - - - - - + + - + @@ -132,7 +127,7 @@ - + @@ -158,6 +153,7 @@ ItemContainerStyle="{StaticResource ListViewItemFocusEngagementStyle}" ItemsSource="{x:Bind SongsSource.View, Mode=OneWay}" Loaded="SongListView_OnLoaded" + ScrollViewer.IsVerticalScrollChainingEnabled="False" SelectionMode="None"> @@ -225,11 +221,11 @@ - - + +