|
19 | 19 | d:DataContext="{d:DesignInstance viewModels:UserSettings}" |
20 | 20 | > |
21 | 21 | <controls:MicaWindow.Resources> |
| 22 | + <Style x:Key="DefaultSplitButtonToggleButtonStyle" TargetType="{x:Type ToggleButton}"> |
| 23 | + <Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
| 24 | + <Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" /> |
| 25 | + <Setter Property="Background" Value="Transparent" /> |
| 26 | + <Setter Property="BorderBrush" Value="Transparent" /> |
| 27 | + <Setter Property="BorderThickness" Value="0" /> |
| 28 | + <Setter Property="Border.CornerRadius" Value="0" /> |
| 29 | + <Setter Property="Padding" Value="4,0" /> |
| 30 | + <Setter Property="SnapsToDevicePixels" Value="True" /> |
| 31 | + <Setter Property="OverridesDefaultStyle" Value="True" /> |
| 32 | + <Setter Property="Template"> |
| 33 | + <Setter.Value> |
| 34 | + <ControlTemplate TargetType="{x:Type ToggleButton}"> |
| 35 | + <Border |
| 36 | + x:Name="ContentBorder" |
| 37 | + Padding="{TemplateBinding Padding}" |
| 38 | + Background="{TemplateBinding Background}" |
| 39 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 40 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 41 | + CornerRadius="{TemplateBinding Border.CornerRadius}"> |
| 42 | + <ContentPresenter |
| 43 | + x:Name="PART_ContentHost" |
| 44 | + Content="{TemplateBinding Content}" |
| 45 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 46 | + ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" |
| 47 | + RenderTransformOrigin="0.5,0.5"> |
| 48 | + <ContentPresenter.RenderTransform> |
| 49 | + <RotateTransform Angle="-90" /> |
| 50 | + </ContentPresenter.RenderTransform> |
| 51 | + </ContentPresenter> |
| 52 | + </Border> |
| 53 | + </ControlTemplate> |
| 54 | + </Setter.Value> |
| 55 | + </Setter> |
| 56 | + </Style> |
22 | 57 | <!-- |
23 | 58 | Same appearance as MicaWPF.Styles.AccentedButton, but the hover/pressed states dim the accent |
24 | 59 | color instead of animating it to the system accent shade, so the album art accent color |
|
136 | 171 | <RowDefinition Height="Auto"/> |
137 | 172 | <RowDefinition Height="Auto"/> |
138 | 173 | </Grid.RowDefinitions> |
139 | | - <StackPanel Grid.Row="0" Margin="12" Orientation="Horizontal"> |
140 | | - <Border Name="SongImageBorder" CornerRadius="6" BorderThickness="1" BorderBrush="#26FFFFFF" Margin="0" ClipToBounds="True" Width="78" Height="78"> |
141 | | - <ui:SymbolIcon Name="SongImagePlaceholder" Symbol="MusicNote220" FontSize="40" Filled="True" Foreground="{DynamicResource MicaWPF.Brushes.SystemAccentColorSecondary}" Visibility="Collapsed" /> |
142 | | - <Border.Background> |
143 | | - <ImageBrush x:Name="SongImage" Stretch="UniformToFill"/> |
144 | | - </Border.Background> |
145 | | - </Border> |
146 | | - <StackPanel Name="BodyStackPanel" Orientation="Vertical" VerticalAlignment="Center" Width="194"> |
147 | | - <StackPanel Orientation="Horizontal"> |
148 | | - <StackPanel Name="SongInfoStackPanel" Margin="12,0,0,0" Orientation="Vertical" VerticalAlignment="Center" Width="182" |
| 174 | + <StackPanel Grid.Row="0" Margin="10" Orientation="Horizontal"> |
| 175 | + <Border Name="SongImageBorder" CornerRadius="4" Margin="0" ClipToBounds="True" Width="82" Height="82"> |
| 176 | + <ui:SymbolIcon Name="SongImagePlaceholder" Symbol="MusicNote220" FontSize="40" Filled="True" Foreground="{DynamicResource MicaWPF.Brushes.SystemAccentColorSecondary}" Visibility="Collapsed" /> |
| 177 | + <Border.Background> |
| 178 | + <ImageBrush x:Name="SongImage" Stretch="UniformToFill"/> |
| 179 | + </Border.Background> |
| 180 | + </Border> |
| 181 | + <StackPanel Name="BodyStackPanel" Orientation="Vertical" VerticalAlignment="Center" Width="194"> |
| 182 | + <StackPanel Orientation="Horizontal"> |
| 183 | + <StackPanel Name="SongInfoStackPanel" Margin="8,0,0,0" Orientation="Vertical" VerticalAlignment="Center" Width="182" |
149 | 184 | ToolTipService.InitialShowDelay="800" |
150 | 185 | ToolTipService.Placement="Top" |
151 | 186 | ToolTipService.VerticalOffset="-16"> |
152 | | - <TextBlock Name="SongTitle" Text="Song Title" FontSize="14" FontWeight="Medium" TextTrimming="CharacterEllipsis" /> |
153 | | - <TextBlock Name="SongArtist" Text="Artist Name" FontSize="14" FontWeight="Medium" Opacity="0.5" TextTrimming="CharacterEllipsis" /> |
| 187 | + <TextBlock Name="SongTitle" Text="Song Title" FontSize="14" FontWeight="Medium" TextTrimming="CharacterEllipsis" /> |
| 188 | + <TextBlock Name="SongArtist" Text="Artist Name" FontSize="14" FontWeight="Medium" Opacity="0.5" TextTrimming="CharacterEllipsis" /> |
| 189 | + </StackPanel> |
154 | 190 | </StackPanel> |
155 | | - </StackPanel> |
156 | | - <Grid Name="ControlsStackPanelContainer" HorizontalAlignment="Stretch" Height="35" Margin="12,8,0,0"> |
157 | | - <StackPanel Name="ControlsStackPanel" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> |
158 | | - <!--<ui:Button Name="ControlBack" Icon="{ui:SymbolIcon Previous20, Filled=True}" Width="28" Height="28" Padding="0" CornerRadius="999" Margin="0,0,8,0" Click="Back_Click" Focusable="False"/>--> |
159 | | - <controls:Button |
| 191 | + <Grid Name="ControlsStackPanelContainer" HorizontalAlignment="Stretch" Height="35" Margin="8,8,0,0"> |
| 192 | + <Grid.ColumnDefinitions> |
| 193 | + <ColumnDefinition Width="*" /> |
| 194 | + <ColumnDefinition Width="Auto" /> |
| 195 | + </Grid.ColumnDefinitions> |
| 196 | + <StackPanel Name="ControlsStackPanel" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> |
| 197 | + <!--<ui:Button Name="ControlBack" Icon="{ui:SymbolIcon Previous20, Filled=True}" Width="28" Height="28" Padding="0" CornerRadius="999" Margin="0,0,8,0" Click="Back_Click" Focusable="False"/>--> |
| 198 | + <controls:Button |
160 | 199 | Height="28" Width="28" Name="ControlBack" |
161 | 200 | Margin="0" Click="Back_Click" Focusable="False" |
162 | 201 | Style="{StaticResource MicaWPF.Styles.TransparentButton}" VerticalAlignment="Center"> |
163 | | - <ui:SymbolIcon Name="SymbolBack" Symbol="Previous20" Filled="True"/> |
164 | | - </controls:Button> |
165 | | - <controls:Button |
| 202 | + <ui:SymbolIcon Name="SymbolBack" Symbol="Previous20" Filled="True"/> |
| 203 | + </controls:Button> |
| 204 | + <controls:Button |
166 | 205 | Height="32" Width="32" Name="ControlPlayPause" |
167 | 206 | Margin="8,0,0,0" Click="PlayPause_Click" Focusable="False" |
168 | 207 | Style="{StaticResource PlayPauseButtonStyle}" VerticalAlignment="Center"> |
169 | | - <ui:SymbolIcon Name="SymbolPlayPause" Symbol="Pause16" Filled="True"/> |
170 | | - </controls:Button> |
171 | | - <controls:Button |
| 208 | + <ui:SymbolIcon Name="SymbolPlayPause" Symbol="Pause16" Filled="True"/> |
| 209 | + </controls:Button> |
| 210 | + <controls:Button |
172 | 211 | Height="28" Width="28" Name="ControlForward" |
173 | 212 | Margin="8,0,0,0" Click="Forward_Click" Focusable="False" |
174 | 213 | Style="{StaticResource MicaWPF.Styles.TransparentButton}" VerticalAlignment="Center"> |
175 | | - <ui:SymbolIcon Name="SymbolForward" Symbol="Next20" Filled="True"/> |
176 | | - </controls:Button> |
177 | | - <controls:Button |
| 214 | + <ui:SymbolIcon Name="SymbolForward" Symbol="Next20" Filled="True"/> |
| 215 | + </controls:Button> |
| 216 | + <controls:Button |
178 | 217 | Width="28" Height="28" Name="ControlClose" |
179 | 218 | Margin="8,0,0,0" Click="MediaFlyoutCloseButton_Click" |
180 | 219 | Style="{StaticResource MicaWPF.Styles.TransparentButton}" VerticalAlignment="Center" |
181 | 220 | Visibility="Collapsed"> |
182 | | - <ui:SymbolIcon Symbol="Dismiss20" Filled="True"/> |
183 | | - </controls:Button> |
184 | | - <controls:Button |
| 221 | + <ui:SymbolIcon Symbol="Dismiss20" Filled="True"/> |
| 222 | + </controls:Button> |
| 223 | + <controls:Button |
185 | 224 | Height="28" Width="28" Name="ControlRepeat" |
186 | 225 | Margin="8,0,0,0" Click="Repeat_Click" Focusable="False" |
187 | 226 | Style="{StaticResource MicaWPF.Styles.TransparentButton}" VerticalAlignment="Center"> |
188 | | - <ui:SymbolIcon Name="SymbolRepeat" Symbol="ArrowRepeatAllOff24" Filled="false" Opacity="0.5" FontSize="18"/> |
189 | | - </controls:Button> |
| 227 | + <ui:SymbolIcon Name="SymbolRepeat" Symbol="ArrowRepeatAllOff24" Filled="false" Opacity="0.5" FontSize="18"/> |
| 228 | + </controls:Button> |
190 | 229 | <controls:Button |
191 | 230 | Height="28" Width="28" Name="ControlShuffle" |
192 | 231 | Margin="8,0,0,0" Click="Shuffle_Click" Focusable="False" |
193 | 232 | Style="{StaticResource MicaWPF.Styles.TransparentButton}" VerticalAlignment="Center"> |
194 | 233 | <ui:SymbolIcon Name="SymbolShuffle" Symbol="ArrowShuffleOff24" Filled="false" Opacity="0.5" FontSize="18"/> |
195 | 234 | </controls:Button> |
196 | | - |
197 | | - <controls:Button Name="MediaIdButton" Padding="0" Height="28" Width="70" |
198 | | - Margin="8,0,0,0" |
199 | | - Style="{StaticResource MicaWPF.Styles.TransparentButton}" |
200 | | - Click="MediaIdButton_Click" |
201 | | - MouseRightButtonUp="MediaIdButton_RightClick"> |
202 | | - <StackPanel Orientation="Horizontal" Margin="2,0"> |
203 | | - <Image x:Name="MediaIdIcon" Width="14" Height="14"/> |
204 | | - <TextBlock Name="MediaId" VerticalAlignment="Center" FontSize="10" Width="48" Margin="4,0,0,0" FontWeight="Regular" Opacity="0.25" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/> |
205 | | - </StackPanel> |
206 | | - </controls:Button> |
207 | | - |
208 | 235 | </StackPanel> |
209 | | - </Grid> |
| 236 | + |
| 237 | + <ui:SplitButton Name="MediaIdButton" Grid.Column="1" Padding="0" Height="28" Width="Auto" MaxWidth="90" |
| 238 | + Margin="8,0,0,0" |
| 239 | + Background="Transparent" |
| 240 | + BorderThickness="0" |
| 241 | + HorizontalAlignment="Right" |
| 242 | + VerticalAlignment="Center" |
| 243 | + Click="MediaIdButton_Click"> |
| 244 | + <StackPanel Orientation="Horizontal" Margin="4,0"> |
| 245 | + <Image x:Name="MediaIdIcon" Width="14" Height="14"/> |
| 246 | + <TextBlock Name="MediaId" VerticalAlignment="Center" FontSize="10" Width="Auto" MaxWidth="48" Margin="4,0,0,0" FontWeight="Regular" Opacity="0.5" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/> |
| 247 | + </StackPanel> |
| 248 | + </ui:SplitButton> |
| 249 | + |
| 250 | + </Grid> |
| 251 | + </StackPanel> |
210 | 252 | </StackPanel> |
211 | | - </StackPanel> |
212 | 253 | <DockPanel Grid.Row="1" x:Name="SeekbarWrapper" HorizontalAlignment="Stretch" Margin="16,0,16,12" LastChildFill="True" VerticalAlignment="Center"> |
213 | 254 | <TextBlock Name="SeekbarCurrentDuration" Text="-:--" Opacity="0.5" FontSize="12" DockPanel.Dock="Left" Width="45" Margin="0,0,2,0" TextAlignment="Left" VerticalAlignment="Center" Height="18"/> |
214 | 255 | <TextBlock Name="SeekbarMaxDuration" Text="-:--" Opacity="0.5" FontSize="12" DockPanel.Dock="Right" Width="45" Margin="2,0,0,0" TextAlignment="Right" VerticalAlignment="Center" Height="18"/> |
|
0 commit comments