From 514f9594bf16269df74e74b27101b2ccfc23026d Mon Sep 17 00:00:00 2001
From: Joseph Beattie <74561130+josephbeattie@users.noreply.github.com>
Date: Tue, 8 Mar 2022 20:12:33 +0000
Subject: [PATCH] Fixed titlebar bug. Added progressring on scan.
---
Rise Media Player Dev/Settings/AllSettingsPage.xaml | 2 +-
Rise Media Player Dev/UserControls/ExtendedTitleBar.xaml | 5 +++--
.../UserControls/ExtendedTitleBar.xaml.cs | 6 +++++-
Rise Media Player Dev/Views/CurrentlyPlayingPage.xaml.cs | 4 +++-
Rise Media Player Dev/Views/FullNowPlayingPage.xaml | 2 +-
Rise Media Player Dev/Windows/MainPage.xaml | 7 +++++--
Rise Media Player Dev/Windows/MainPage.xaml.cs | 6 ++++++
7 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/Rise Media Player Dev/Settings/AllSettingsPage.xaml b/Rise Media Player Dev/Settings/AllSettingsPage.xaml
index 8eca5a97..726540aa 100644
--- a/Rise Media Player Dev/Settings/AllSettingsPage.xaml
+++ b/Rise Media Player Dev/Settings/AllSettingsPage.xaml
@@ -45,7 +45,7 @@
-
+
-
+
- Rise Media Player
+ Rise
+ Media Player
diff --git a/Rise Media Player Dev/UserControls/ExtendedTitleBar.xaml.cs b/Rise Media Player Dev/UserControls/ExtendedTitleBar.xaml.cs
index 095d8368..b3c6744e 100644
--- a/Rise Media Player Dev/UserControls/ExtendedTitleBar.xaml.cs
+++ b/Rise Media Player Dev/UserControls/ExtendedTitleBar.xaml.cs
@@ -30,6 +30,10 @@ public sealed partial class ExtendedTitleBar : UserControl
///
/// The icon displayed on the titlebar.
///
+ ///
+
+ public static ExtendedTitleBar Current;
+
public string Icon
{
get => (string)GetValue(IconProperty);
@@ -94,7 +98,7 @@ public ExtendedTitleBar()
public void SetupTitleBar()
{
ApplicationViewTitleBar bar = ApplicationView.GetForCurrentView().TitleBar;
-
+ Current = this;
bar.ButtonBackgroundColor = Colors.Transparent;
bar.ButtonInactiveBackgroundColor = Colors.Transparent;
diff --git a/Rise Media Player Dev/Views/CurrentlyPlayingPage.xaml.cs b/Rise Media Player Dev/Views/CurrentlyPlayingPage.xaml.cs
index f85be2af..54b1478f 100644
--- a/Rise Media Player Dev/Views/CurrentlyPlayingPage.xaml.cs
+++ b/Rise Media Player Dev/Views/CurrentlyPlayingPage.xaml.cs
@@ -34,10 +34,12 @@ private void Queue_Click(object sender, RoutedEventArgs e)
private async void Button_Click(object sender, RoutedEventArgs e)
{
- MainPage.Current.AppTitleBar.Visibility = Visibility.Visible;
+ UserControls.ExtendedTitleBar.Current.AppTitleBar.IsHitTestVisible = true;
var preferences = ViewModePreferences.CreateDefault(ApplicationViewMode.CompactOverlay);
preferences.CustomSize = new Size(600, 700);
_ = await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.Default, preferences);
+ MainPage.Current.AppTitleBar.Visibility = Visibility.Visible;
+ MainPage.Current.AppTitleBar.SetupTitleBar();
}
}
diff --git a/Rise Media Player Dev/Views/FullNowPlayingPage.xaml b/Rise Media Player Dev/Views/FullNowPlayingPage.xaml
index 3bb381d5..f65781c6 100644
--- a/Rise Media Player Dev/Views/FullNowPlayingPage.xaml
+++ b/Rise Media Player Dev/Views/FullNowPlayingPage.xaml
@@ -65,7 +65,7 @@
-
+
-
+
+
+
+
@@ -292,7 +295,7 @@
-
+
diff --git a/Rise Media Player Dev/Windows/MainPage.xaml.cs b/Rise Media Player Dev/Windows/MainPage.xaml.cs
index 8bde0349..efe0eee3 100644
--- a/Rise Media Player Dev/Windows/MainPage.xaml.cs
+++ b/Rise Media Player Dev/Windows/MainPage.xaml.cs
@@ -68,6 +68,7 @@ public sealed partial class MainPage : Page
public MainPage()
{
InitializeComponent();
+ var titleBar = ApplicationView.GetForCurrentView().TitleBar;
Current = this;
SDialog.Content = new SettingsPage();
Loaded += MainPage_Loaded;
@@ -692,7 +693,12 @@ private async void Button_Click(object sender, RoutedEventArgs e)
private async void StartScan_Click(object sender, RoutedEventArgs e)
{
+ ProfileMenu.Hide();
+ OpenSync.Visibility = Visibility.Collapsed;
+ IsScanning.Visibility = Visibility.Visible;
await App.MViewModel.StartFullCrawlAsync();
+ IsScanning.Visibility = Visibility.Collapsed;
+ OpenSync.Visibility = Visibility.Visible;
}
private void OpenSettings_Click(object sender, RoutedEventArgs e)