Archived
1
0

Ads added; Fullscreen & minivew modes fixed; Titlebar returned

This commit is contained in:
Michael Gordeev
2018-11-04 15:32:51 +03:00
parent 75cf389286
commit 4d13ea1226
5 changed files with 8 additions and 21 deletions
-2
View File
@@ -100,7 +100,6 @@ namespace FoxTube
Window.Current.Activate(); Window.Current.Activate();
} }
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
ActivateToastBackgoundTask(); ActivateToastBackgoundTask();
ActivateBackgoundTask(); ActivateBackgoundTask();
} }
@@ -239,7 +238,6 @@ namespace FoxTube
} }
} }
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
Window.Current.Activate(); Window.Current.Activate();
} }
+2 -3
View File
@@ -1,5 +1,4 @@
using System.Diagnostics; using Windows.UI.Xaml;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls;
namespace FoxTube.Controls namespace FoxTube.Controls
@@ -32,7 +31,7 @@ namespace FoxTube.Controls
public Advert() public Advert()
{ {
this.InitializeComponent(); InitializeComponent();
if (!SecretsVault.AdsDisabled) if (!SecretsVault.AdsDisabled)
Visibility = Visibility.Visible; Visibility = Visibility.Visible;
else else
+1 -4
View File
@@ -634,8 +634,7 @@ namespace FoxTube
titleBar.ButtonBackgroundColor = Colors.Transparent; titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
coreTitleBar.ExtendViewIntoTitleBar = true;
mainControls.Visibility = Visibility.Collapsed; mainControls.Visibility = Visibility.Collapsed;
header.Visibility = Visibility.Collapsed; header.Visibility = Visibility.Collapsed;
@@ -651,8 +650,6 @@ namespace FoxTube
{ {
await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.Default); await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.Default);
//Methods.MainPage.SetTitleBar();
mainControls.Visibility = Visibility.Visible; mainControls.Visibility = Visibility.Visible;
header.Visibility = Visibility.Visible; header.Visibility = Visibility.Visible;
+2 -8
View File
@@ -112,7 +112,6 @@ namespace FoxTube
protected override void OnNavigatedTo(NavigationEventArgs e) protected override void OnNavigatedTo(NavigationEventArgs e)
{ {
base.OnNavigatedTo(e); base.OnNavigatedTo(e);
SetTitleBar();
} }
public Video GetCurrentItem() public Video GetCurrentItem()
@@ -378,7 +377,6 @@ namespace FoxTube
nav.IsBackEnabled = true; nav.IsBackEnabled = true;
else else
nav.IsBackEnabled = false; nav.IsBackEnabled = false;
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
} }
public void MaximizeVideo() public void MaximizeVideo()
@@ -390,7 +388,6 @@ namespace FoxTube
videoPlaceholder.Margin = new Thickness(0); videoPlaceholder.Margin = new Thickness(0);
nav.IsBackEnabled = true; nav.IsBackEnabled = true;
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
} }
public void Fullscreen(bool on) public void Fullscreen(bool on)
@@ -404,7 +401,7 @@ namespace FoxTube
if ((videoPlaceholder.Content as VideoPage).player.MiniView) if ((videoPlaceholder.Content as VideoPage).player.MiniView)
nav.Margin = new Thickness(0, -48, 0, 0); nav.Margin = new Thickness(0, -48, 0, 0);
else else
nav.Margin = new Thickness(0, -60, 0, 0); nav.Margin = new Thickness(0, -50, 0, 0);
} }
else else
{ {
@@ -414,9 +411,8 @@ namespace FoxTube
nav.Margin = new Thickness(0); nav.Margin = new Thickness(0);
nav.OpenPaneLength = 300; nav.OpenPaneLength = 300;
nav.CompactPaneLength = 48; nav.CompactPaneLength = 48;
SetTitleBar();
} }
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = on;
} }
public void CloseVideo() public void CloseVideo()
@@ -435,8 +431,6 @@ namespace FoxTube
nav.IsBackEnabled = true; nav.IsBackEnabled = true;
else else
nav.IsBackEnabled = false; nav.IsBackEnabled = false;
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
} }
private void search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) private void search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
@@ -131,7 +131,6 @@ namespace FoxTube.Pages.SettingsPages
else else
Methods.MainPage.RequestedTheme = ElementTheme.Light; Methods.MainPage.RequestedTheme = ElementTheme.Light;
} }
Methods.MainPage.SetTitleBar(); Methods.MainPage.SetTitleBar();
} }