Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

支持鼠标中键及侧键返回 #888

Merged
merged 1 commit into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/App/Pages/Overlay/PlayerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:loc="using:Richasy.Bili.Locator.Uwp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:pages="using:Richasy.Bili.App.Pages"
mc:Ignorable="d">

Expand Down
19 changes: 0 additions & 19 deletions src/App/Pages/Overlay/PlayerPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,6 @@ protected override void OnNavigatedFrom(NavigationEventArgs e)
CoreViewModel.IsOverLayerExtendToTitleBar = false;
}

/// <inheritdoc/>
protected override void OnPointerReleased(PointerRoutedEventArgs e)
{
if (e.GetCurrentPoint(this).Properties.PointerUpdateKind == Windows.UI.Input.PointerUpdateKind.XButton1Released)
{
e.Handled = true;
if (ViewModel.PlayerDisplayMode != PlayerDisplayMode.Default)
{
ViewModel.PlayerDisplayMode = PlayerDisplayMode.Default;
}
else
{
CoreViewModel.Back();
}
}

base.OnPointerReleased(e);
}

private async void OnLoadedAsync(object sender, RoutedEventArgs e)
{
ViewModel.PropertyChanged += OnViewModelPropertyChanged;
Expand Down
2 changes: 1 addition & 1 deletion src/App/Pages/RootPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
muxc:BackdropMaterial.ApplyToRootOrPageBackground="True"
mc:Ignorable="d">

<Grid>
<Grid Background="{ThemeResource SystemControlTransparentBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
Expand Down
4 changes: 3 additions & 1 deletion src/App/Pages/RootPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
/// <inheritdoc/>
protected override void OnPointerReleased(PointerRoutedEventArgs e)
{
if (e.GetCurrentPoint(this).Properties.PointerUpdateKind == Windows.UI.Input.PointerUpdateKind.XButton1Released)
var kind = e.GetCurrentPoint(this).Properties.PointerUpdateKind;
if (kind == Windows.UI.Input.PointerUpdateKind.XButton1Released
|| kind == Windows.UI.Input.PointerUpdateKind.MiddleButtonReleased)
{
e.Handled = true;
CoreViewModel.Back();
Expand Down