Skip to content

Commit

Permalink
Merge pull request #522 from United600/font
Browse files Browse the repository at this point in the history
chore: add media type disabled icons
  • Loading branch information
huynhsontung authored Jan 6, 2025
2 parents f15bbd4 + 8a51369 commit f622247
Show file tree
Hide file tree
Showing 36 changed files with 972 additions and 99 deletions.
17 changes: 1 addition & 16 deletions Screenbox/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:commands="using:Screenbox.Commands"
xmlns:contract13NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,13)"
xmlns:contract13Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,13)"
xmlns:converters="using:Screenbox.Converters"
xmlns:ctAnimations="using:CommunityToolkit.WinUI.Animations"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
Expand Down Expand Up @@ -56,18 +54,9 @@
FalseValue="{strings:Resources Key=Play}"
TrueValue="{strings:Resources Key=Pause}" />

<!-- Custom Icons -->
<contract13NotPresent:FontFamily x:Key="ScreenboxSymbolThemeFontFamily">ms-appx:///Assets/Fonts/ScreenboxMDL2Assets.ttf#Screenbox MDL2 Assets</contract13NotPresent:FontFamily>
<contract13Present:FontFamily x:Key="ScreenboxSymbolThemeFontFamily">ms-appx:///Assets/Fonts/ScreenboxFluentIcons.ttf#Screenbox Fluent Icons</contract13Present:FontFamily>
<!-- Font sizes -->
<x:Double x:Key="TopNavigationViewItemFontSize">18</x:Double>
<x:Double x:Key="TitleMediumTextBlockFontSize">32</x:Double>
<!-- Icon font sizes -->
<x:Double x:Key="StandardIconFontSize">16</x:Double>
<x:Double x:Key="GridItemPlaceholderIconFontSize">56</x:Double>
<x:Double x:Key="WideGridItemPlaceholderIconFontSize">44</x:Double>
<x:Double x:Key="NoContentPanelIconFontSize">128</x:Double>
<x:Double x:Key="NoContentPanelMinimalIconFontSize">96</x:Double>

<!-- Standardize header height with or without top nav -->
<x:Double x:Key="PageHeaderMinHeight">48</x:Double>
Expand Down Expand Up @@ -108,11 +97,6 @@
Duration="{StaticResource ControlFasterAnimationDuration}" />
</ctAnimations:ImplicitAnimationSet>

<!-- Styles -->
<Style TargetType="FontIcon">
<Setter Property="FontSize" Value="{StaticResource StandardIconFontSize}" />
</Style>

<Style
x:Key="TitleMediumTextBlockStyle"
BasedOn="{StaticResource BaseTextBlockStyle}"
Expand Down Expand Up @@ -142,6 +126,7 @@
</ResourceDictionary>

<ResourceDictionary Source="ms-appx:///Styles/Button.xaml" />
<ResourceDictionary Source="ms-appx:///Styles/Icon.xaml" />
<ResourceDictionary Source="ms-appx:///Styles/ItemContainer.xaml" />

</muxc:XamlControlsResources.MergedDictionaries>
Expand Down
Binary file modified Screenbox/Assets/Fonts/ScreenboxFluentIcons.ttf
Binary file not shown.
Binary file modified Screenbox/Assets/Fonts/ScreenboxMDL2Assets.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions Screenbox/Controls/CommonGridViewItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
Fill="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
Stroke="{ThemeResource ControlElevationBorderBrush}"
StrokeThickness="0.8" />
<FontIcon FontSize="{StaticResource StandardIconFontSize}" Glyph="&#xE769;" />
<FontIcon FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}" Glyph="{StaticResource PauseGlyph}" />
</Grid>
<Button
x:Name="PlayButton"
Expand All @@ -70,7 +70,7 @@
Opacity="0"
Style="{StaticResource AccentButtonStyle}"
Visibility="{x:Bind CanPlay, Mode=OneWay}">
<FontIcon FontSize="{StaticResource StandardIconFontSize}" Glyph="{x:Bind IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}, Mode=OneWay}" />
<FontIcon FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}" Glyph="{x:Bind IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}, Mode=OneWay}" />
</Button>

<!--
Expand Down
15 changes: 8 additions & 7 deletions Screenbox/Controls/PlayerControls.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<converters:ToggleButtonCheckToRepeatModeConverter x:Key="ToggleButtonCheckToRepeatModeConverter" />
<toolkitConverters:BoolToObjectConverter
x:Key="ShuffleModeGlyphConverter"
FalseValue="&#xF002A;"
TrueValue="&#xE8B1;" />
FalseValue="{StaticResource ShuffleOffGlyph}"
TrueValue="{StaticResource ShuffleGlyph}" />

<Flyout x:Key="VolumeControlFlyout">
<Flyout.FlyoutPresenterStyle>
Expand Down Expand Up @@ -122,7 +122,8 @@
<MenuFlyoutItem
AccessKey="{strings:KeyboardResources Key=MenuItemFileKey}"
Command="{x:Bind Common.OpenFilesCommand}"
Icon="{ui:FontIcon Glyph=&#xE838;}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource FolderOpenGlyph}}"
KeyTipPlacementMode="Left"
Text="{strings:Resources Key=OpenFiles}">
<MenuFlyoutItem.KeyboardAccelerators>
Expand Down Expand Up @@ -217,7 +218,7 @@
AccessKey="{strings:KeyboardResources Key=MenuItemSaveSnapshotKey}"
Command="{x:Bind ViewModel.SaveSnapshotCommand}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xEE71;}"
Glyph={StaticResource ImageExportGlyph}}"
Text="{x:Bind strings:Resources.SaveCurrentFrame}"
Visibility="{x:Bind helpers:SystemInformation.IsDesktop}" />
<MenuFlyoutItem
Expand Down Expand Up @@ -311,7 +312,7 @@
AccessKey="{strings:KeyboardResources Key=MenuItemCompactOverlayKey}"
Command="{x:Bind ViewModel.ToggleCompactLayoutCommand}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xEE49;}"
Glyph={StaticResource MiniContract2MirroredGlyph}}"
Text="{x:Bind strings:Resources.CompactOverlayToggle(ViewModel.IsCompact), Mode=OneWay}"
Visibility="Collapsed">
<MenuFlyoutItem.KeyboardAccelerators>
Expand Down Expand Up @@ -532,7 +533,7 @@
<FontIcon
x:Name="CompactOverlayButtonIcon"
FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}"
Glyph="&#xEE49;"
Glyph="{StaticResource MiniContract2MirroredGlyph}"
MirroredWhenRightToLeft="True" />
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="M" Modifiers="Control" />
Expand Down Expand Up @@ -637,7 +638,7 @@
<Setter Target="RepeatButton.Visibility" Value="Collapsed" />
<Setter Target="ShuffleButton.Visibility" Value="Collapsed" />
<Setter Target="CompactOverlayButton.Style" Value="{StaticResource SmallPlayerButtonStyle}" />
<Setter Target="CompactOverlayButtonIcon.Glyph" Value="&#xEE47;" />
<Setter Target="CompactOverlayButtonIcon.Glyph" Value="{StaticResource MiniExpand2MirroredGlyph}" />
<Setter Target="MoreButton.Visibility" Value="Collapsed" />
<Setter Target="SeekBar.(Grid.Row)" Value="2" />
<Setter Target="SeekBar.Margin" Value="0" />
Expand Down
21 changes: 14 additions & 7 deletions Screenbox/Controls/PlaylistView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,20 @@
<MenuFlyoutItem
Command="{x:Bind ViewModel.Playlist.PlaySingleCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon Glyph=&#xE768;}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Text="{strings:Resources Key=Play}" />
<MenuFlyoutItem
Command="{x:Bind ViewModel.PlayNextCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xF5EB;}"
Glyph={StaticResource PlayAddGlyph}}"
Text="{strings:Resources Key=PlayNext}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem
Command="{x:Bind ViewModel.RemoveCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon Glyph=&#xE74D;}"
Icon="{ui:FontIcon Glyph=&#xE894;}"
Text="{strings:Resources Key=Remove}" />
<MenuFlyoutItem
Command="{x:Bind ViewModel.MoveItemUpCommand}"
Expand Down Expand Up @@ -112,7 +113,10 @@
Command="{x:Bind ViewModel.AddFilesCommand}"
Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<FontIcon Margin="{StaticResource IconButtonStandardIconMargin}" Glyph="&#xE838;" />
<FontIcon
Margin="{StaticResource IconButtonStandardIconMargin}"
FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}"
Glyph="{StaticResource FolderOpenGlyph}" />
<TextBlock Margin="8,0,0,0" Text="{strings:Resources Key=AddFiles}" />
</StackPanel>
</Button>
Expand All @@ -126,7 +130,10 @@
IsEnabled="{x:Bind ViewModel.HasItems, Mode=OneWay}"
KeyTipPlacementMode="Bottom">
<StackPanel Orientation="Horizontal">
<FontIcon Margin="{StaticResource IconButtonStandardIconMargin}" Glyph="&#xE74D;" />
<FontIcon
Margin="{StaticResource IconButtonStandardIconMargin}"
FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}"
Glyph="{StaticResource DeleteGlyph}" />
<TextBlock
x:Name="ClearButtonLabel"
Margin="8,0,0,0"
Expand Down Expand Up @@ -193,13 +200,13 @@
Command="{x:Bind ViewModel.PlaySelectedNextCommand}"
CommandParameter="{x:Bind PlaylistListView.SelectedItems}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xF5EB;}"
Glyph={StaticResource PlayAddGlyph}}"
Label="{strings:Resources Key=PlayNext}" />
<AppBarButton
x:Name="RemoveSelectedButton"
Command="{x:Bind ViewModel.RemoveSelectedCommand}"
CommandParameter="{x:Bind PlaylistListView.SelectedItems}"
Icon="Delete"
Icon="{ui:FontIcon Glyph=&#xE894;}"
Label="{strings:Resources Key=Remove}">
<AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Key="Delete" />
Expand Down
11 changes: 7 additions & 4 deletions Screenbox/Pages/AlbumDetailsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
<MenuFlyoutItem
Command="{x:Bind ViewModel.PlayCommand}"
CommandParameter="{Binding}"
Icon="{ui:SymbolIcon Symbol=Play}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Text="{strings:Resources Key=Play}" />
<MenuFlyoutItem
Command="{x:Bind Common.PlayNextCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xF5EB;}"
Glyph={StaticResource PlayAddGlyph}}"
Text="{strings:Resources Key=PlayNext}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem
Expand Down Expand Up @@ -196,7 +197,8 @@
BorderBrush="{StaticResource AccentButtonBorderBrush}"
Command="{x:Bind ViewModel.PlayCommand}"
CommandParameter="{x:Bind ViewModel.SortedItems, Mode=OneWay, Converter={StaticResource FirstOrDefaultConverter}}"
Icon="{ui:FontIcon Glyph=&#xE768;}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Label="{strings:Resources Key=Play}"
Style="{StaticResource AppBarButtonAccentButtonStyle}"
XYFocusDown="{x:Bind ItemList}">
Expand All @@ -209,7 +211,8 @@
HorizontalAlignment="Stretch"
BorderBrush="{ThemeResource ButtonBorderBrush}"
Command="{x:Bind ViewModel.ShuffleAndPlayCommand}"
Icon="{ui:FontIcon Glyph=&#xE8B1;,
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource ShuffleGlyph},
MirroredWhenRightToLeft=True}"
Label="{strings:Resources Key=ShuffleAndPlay}"
Style="{StaticResource AppBarButtonDefaultButtonStyle}"
Expand Down
5 changes: 3 additions & 2 deletions Screenbox/Pages/AlbumsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<MenuFlyout x:Key="AlbumFlyout">
<MenuFlyoutItem Command="{Binding PlayAlbumCommand}" Text="{Binding IsPlaying, Converter={StaticResource BoolToPlayPauseTextConverter}}">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="{Binding IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}}" />
<FontIcon FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}" Glyph="{Binding IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}}" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
Expand Down Expand Up @@ -69,7 +69,8 @@
<StackPanel Orientation="Horizontal">
<FontIcon
Margin="{StaticResource IconButtonStandardIconMargin}"
Glyph="&#xE8B1;"
FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}"
Glyph="{StaticResource ShuffleGlyph}"
MirroredWhenRightToLeft="True" />
<TextBlock Margin="8,0,0,0" Text="{strings:Resources Key=ShuffleAndPlay}" />
</StackPanel>
Expand Down
5 changes: 3 additions & 2 deletions Screenbox/Pages/AllVideosPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
<MenuFlyoutItem
Command="{x:Bind ViewModel.PlayCommand}"
CommandParameter="{Binding}"
Icon="{ui:SymbolIcon Symbol=Play}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Text="{strings:Resources Key=Play}" />
<MenuFlyoutItem
Command="{x:Bind Common.PlayNextCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xF5EB;}"
Glyph={StaticResource PlayAddGlyph}}"
Text="{strings:Resources Key=PlayNext}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem
Expand Down
11 changes: 7 additions & 4 deletions Screenbox/Pages/ArtistDetailsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@
<MenuFlyoutItem
Command="{x:Bind ViewModel.PlayCommand}"
CommandParameter="{Binding}"
Icon="{ui:SymbolIcon Symbol=Play}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Text="{strings:Resources Key=Play}" />
<MenuFlyoutItem
Command="{x:Bind Common.PlayNextCommand}"
CommandParameter="{Binding}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph=&#xF5EB;}"
Glyph={StaticResource PlayAddGlyph}}"
Text="{strings:Resources Key=PlayNext}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem
Expand Down Expand Up @@ -276,7 +277,8 @@
BackgroundSizing="OuterBorderEdge"
BorderBrush="{ThemeResource AccentButtonBorderBrush}"
Command="{x:Bind ViewModel.PlayCommand}"
Icon="{ui:FontIcon Glyph=&#xE768;}"
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource PlayGlyph}}"
Label="{strings:Resources Key=Play}"
Style="{StaticResource AppBarButtonAccentButtonStyle}"
XYFocusDown="{x:Bind ItemList}">
Expand All @@ -289,7 +291,8 @@
HorizontalAlignment="Stretch"
BorderBrush="{ThemeResource ButtonBorderBrush}"
Command="{x:Bind ViewModel.ShuffleAndPlayCommand}"
Icon="{ui:FontIcon Glyph=&#xE8B1;,
Icon="{ui:FontIcon FontFamily={StaticResource ScreenboxSymbolThemeFontFamily},
Glyph={StaticResource ShuffleGlyph},
MirroredWhenRightToLeft=True}"
Label="{strings:Resources Key=ShuffleAndPlay}"
Style="{StaticResource AppBarButtonDefaultButtonStyle}"
Expand Down
5 changes: 3 additions & 2 deletions Screenbox/Pages/ArtistsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<MenuFlyout x:Key="ArtistFlyout">
<MenuFlyoutItem Command="{Binding PlayArtistCommand}" Text="{Binding IsPlaying, Converter={StaticResource BoolToPlayPauseTextConverter}}">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="{Binding IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}}" />
<FontIcon FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}" Glyph="{Binding IsPlaying, Converter={StaticResource PlayPauseGlyphConverter}}" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
Expand Down Expand Up @@ -64,7 +64,8 @@
<StackPanel Orientation="Horizontal">
<FontIcon
Margin="{StaticResource IconButtonStandardIconMargin}"
Glyph="&#xE8B1;"
FontFamily="{StaticResource ScreenboxSymbolThemeFontFamily}"
Glyph="{StaticResource ShuffleGlyph}"
MirroredWhenRightToLeft="True" />
<TextBlock Margin="8,0,0,0" Text="{strings:Resources Key=ShuffleAndPlay}" />
</StackPanel>
Expand Down
Loading

0 comments on commit f622247

Please sign in to comment.