Skip to content

Commit 7930fef

Browse files
committed
Refine SmokeViewQueueGrid UI and simplify popup logic
- Increased overlay opacity for better visibility. - Made ViewQueueGrid responsive with MaxWidth/MaxHeight and added a border. - Removed connected animation from PopUpBackButton_Click; now only triggers DismissRequested. - Minor formatting update in MediaPlaybackSection.xaml.cs.
1 parent 09fc6a2 commit 7930fef

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

Dimmer/Dimmer.WinUI/Views/CustomViews/WinuiViews/MediaPlaybackSection.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private void NextBtn_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArg
2727

2828
private void ViewNowPlayingSong_Click(object sender, RoutedEventArgs e)
2929
{
30-
MyViewModel.NavigateToAnyPageOfGivenType(typeof(NowPlayingPage));
30+
MyViewModel.NavigateToAnyPageOfGivenType(typeof(NowPlayingPage));
3131
}
3232

3333
private void ViewLyricsButton_Click(object sender, RoutedEventArgs e)

Dimmer/Dimmer.WinUI/Views/CustomViews/WinuiViews/SmokeViewQueueGrid.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
PointerPressed="SmokeGrid_PointerPressed"
1818
>
1919
<Grid.Background>
20-
<SolidColorBrush Opacity="0.7" Color="{ThemeResource SystemChromeAltHighColor}" />
20+
<SolidColorBrush Opacity="0.8" Color="{ThemeResource SystemChromeAltHighColor}" />
2121
</Grid.Background>
2222

2323
<Grid
2424
x:Name="ViewQueueGrid"
2525
x:FieldModifier="Public"
26-
Width="550"
27-
Height="500"
26+
MaxWidth="550"
27+
MaxHeight="500"
2828
HorizontalAlignment="Center"
2929
VerticalAlignment="Center"
3030
Background="#1e1e1e"
31-
BorderThickness="0"
31+
BorderThickness="1"
3232
CornerRadius="5,5,5,5">
3333
<Grid.RowDefinitions>
3434
<RowDefinition Height="Auto" />

Dimmer/Dimmer.WinUI/Views/CustomViews/WinuiViews/SmokeViewQueueGrid.xaml.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,13 @@ private void Animation_Completed(ConnectedAnimation sender, object args)
5151
}
5252
private async void PopUpBackButton_Click(object sender, RoutedEventArgs e)
5353
{
54-
ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("backwardAnimation", this.ViewQueueGrid);
54+
55+
5556

56-
// Collapse the smoke when the animation completes.
57-
animation.Completed += Animation_Completed;
58-
59-
60-
// Use the Direct configuration to go back (if the API is available).
61-
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
62-
{
63-
animation.Configuration = new GravityConnectedAnimationConfiguration();
57+
DismissRequested?.Invoke(this, EventArgs.Empty);
58+
6459

65-
}
6660

67-
DismissRequested?.Invoke(this, EventArgs.Empty);
6861
}
6962

7063
private async void SaveQueueAsPlaylist_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)