Skip to content

Commit

Permalink
Merge branch 'ui/now-playing-improvements' of https://github.com/Rise…
Browse files Browse the repository at this point in the history
…-Software/Rise-Media-Player into ui/now-playing-improvements
  • Loading branch information
itsWindows11 committed Jun 27, 2023
2 parents 5970f4e + d499840 commit 3ad4cb9
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions Rise Media Player Dev/Windows/CompactNowPlayingPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</ResourceDictionary.ThemeDictionaries>

<SolidColorBrush x:Key="MediaTransportControlsPanelBackground" Color="Transparent" />
<x:Double x:Key="MTCSecondaryControlsColumnWidth">0</x:Double>

<conv:StreamToBitmap x:Key="StrmToBmp" />
<conv:ResourceFallback x:Key="ResFallback" />
Expand All @@ -41,9 +42,9 @@

<Grid x:Name="RootGrid">
<Grid.RowDefinitions>
<RowDefinition x:Name="TitleBarArea" Height="40" />
<RowDefinition x:Name="TitleBarArea" Height="32" />
<RowDefinition x:Name="MediaDisplayArea" Height="1*" />
<RowDefinition x:Name="TransportControlsArea" Height="92" />
<RowDefinition x:Name="TransportControlsArea" Height="56" />
</Grid.RowDefinitions>

<!-- Background area -->
Expand Down Expand Up @@ -72,10 +73,12 @@
<skuc:TitleBar
x:Name="TitleBar"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Canvas.ZIndex="1" />

<Button
Margin="4"
Height="32"
Margin="2"
Canvas.ZIndex="2"
Click="OnExitButtonClick"
Style="{StaticResource TransparentButtonStyle}"
Expand All @@ -97,18 +100,15 @@
<uc:RiseMediaPlayerElement.TransportControls>
<uc:RiseMediaTransportControls
x:Name="PlayerControls"
Height="92"
Height="56"
Margin="2,0"
HorizontalControlsAlignment="Left"
IsCompact="True"
IsFullWindowButtonVisible="False"
HorizontalControlsAlignment="Center"
IsNextTrackButtonVisible="True"
IsPlaybackRateButtonVisible="True"
IsPreviousTrackButtonVisible="True"
IsVolumeButtonVisible="False"
IsZoomButtonVisible="False"
IsSkipBackwardEnabled="True"
IsSkipForwardEnabled="True"
ShowAndHideAutomatically="False"
TimelineDisplayMode="Minimal" />
TimelineDisplayMode="Hidden" />
</uc:RiseMediaPlayerElement.TransportControls>
</uc:RiseMediaPlayerElement>

Expand Down Expand Up @@ -144,7 +144,8 @@
HorizontalTextAlignment="Center"
MaxLines="2"
Style="{StaticResource BodyTextBlockStyle}"
Text="{x:Bind MPViewModel.PlayingItemProperties.Artist, Converter={StaticResource ResFallback}, ConverterParameter=UnknownArtistResource, Mode=OneWay}" />
Text="{x:Bind MPViewModel.PlayingItemProperties.Artist, Converter={StaticResource ResFallback}, ConverterParameter=UnknownArtistResource, Mode=OneWay}"
Visibility="Collapsed" />
</Grid>

<VisualStateManager.VisualStateGroups>
Expand All @@ -157,9 +158,6 @@

<VisualState.Setters>
<Setter Target="InfoGrid.Visibility" Value="Collapsed" />

<Setter Target="PlayerControls.IsCompact" Value="True" />
<Setter Target="PlayerControls.IsZoomButtonVisible" Value="True" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand Down Expand Up @@ -263,6 +261,25 @@
</Storyboard>
</VisualState>
</VisualStateGroup>

<VisualStateGroup x:Name="SizeStates">
<VisualState x:Name="LargeSizeState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowHeight="260" MinWindowWidth="260" />
</VisualState.StateTriggers>

<VisualState.Setters>
<Setter Target="PlayerControls.Height" Value="92" />
<Setter Target="TransportControlsArea.Height" Value="92" />

<Setter Target="PlayerControls.TimelineDisplayMode" Value="Full" />
<Setter Target="SubtitleText.Visibility" Value="Visible" />

<Setter Target="PlayerControls.IsSkipBackwardButtonVisible" Value="True" />
<Setter Target="PlayerControls.IsSkipForwardButtonVisible" Value="True" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</Page>

0 comments on commit 3ad4cb9

Please sign in to comment.