Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
 - Updated to support Playnite v9
  • Loading branch information
Tally authored Dec 2, 2021
1 parent af4ee7a commit 136b2e9
Show file tree
Hide file tree
Showing 23 changed files with 671 additions and 133 deletions.
7 changes: 6 additions & 1 deletion Magpie_Desktop/Constants.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
<sys:Double x:Key="FontSizeLarger">20</sys:Double>
<sys:Double x:Key="FontSizeLargest">29</sys:Double>
<FontFamily x:Key="FontFamily">Trebuchet MS</FontFamily>
<FontFamily x:Key="MonospaceFontFamily">Consolas</FontFamily>
<Thickness x:Key="PopupBorderThickness">1</Thickness>
<Thickness x:Key="ControlBorderThickness">1</Thickness>
<sys:Double x:Key="EllipseBorderThickness">1</sys:Double>
<CornerRadius x:Key="ControlCornerRadius">0</CornerRadius>
<Thickness x:Key="SidebarItemPadding">8</Thickness>

<Color x:Key="BlackColor">#FF000000</Color>
<Color x:Key="WhiteColor">#FFFFFFFF</Color>
Expand All @@ -28,14 +30,15 @@
<Color x:Key="BackgroundToneColor">#202020</Color>
<Color x:Key="GridItemBackgroundColor">#6c6c6c</Color>
<Color x:Key="PanelSeparatorColor">#282828</Color>
<Color x:Key="WindowPanelSeparatorColor">#3355CDFF</Color>

<SolidColorBrush x:Key="ControlBackgroundBrush" Color="{DynamicResource MainColorDark}" Opacity="0.7" />
<SolidColorBrush x:Key="TextBrush" Color="{DynamicResource TextColor}" />
<SolidColorBrush x:Key="TextBrushDarker" Color="{DynamicResource TextColorDarker}" />
<SolidColorBrush x:Key="TextBrushDark" Color="{DynamicResource TextColorDark}" />
<SolidColorBrush x:Key="NormalBrush" Color="{DynamicResource MainColor}" />
<SolidColorBrush x:Key="NormalBrushDark" Color="{DynamicResource MainColorDark}" />
<SolidColorBrush x:Key="NormalBorderBrush" Color="{DynamicResource ButtonBackgroundColor}"/>
<SolidColorBrush x:Key="NormalBorderBrush" Color="{DynamicResource ButtonBackgroundColor}" />
<SolidColorBrush x:Key="HoverBrush" Color="{DynamicResource HoverColor}"/>
<SolidColorBrush x:Key="GlyphBrush" Color="{DynamicResource GlyphColor}" />
<SolidColorBrush x:Key="HighlightGlyphBrush" Color="{DynamicResource HighlightGlyphColor}" />
Expand All @@ -44,7 +47,9 @@
<SolidColorBrush x:Key="ButtonBackgroundBrush" Color="{DynamicResource ButtonBackgroundColor}"/>
<SolidColorBrush x:Key="GridItemBackgroundBrush" Color="{DynamicResource GridItemBackgroundColor}" Opacity="0.7 "/>
<SolidColorBrush x:Key="PanelSeparatorBrush" Color="{DynamicResource PanelSeparatorColor}" Opacity="0.7"/>
<SolidColorBrush x:Key="WindowPanelSeparatorBrush" Color="{DynamicResource WindowPanelSeparatorColor}" />
<SolidColorBrush x:Key="PopupBackgroundBrush" Color="{DynamicResource PopupBackgroundColor}" />
<SolidColorBrush x:Key="CheckBoxCheckMarkBkBrush" Color="{DynamicResource MainColorDark}" />

<SolidColorBrush x:Key="PositiveRatingBrush" Color="#78ffa0" />
<SolidColorBrush x:Key="NegativeRatingBrush" Color="#ff6b6b" />
Expand Down
2 changes: 2 additions & 0 deletions Magpie_Desktop/DefaultControls/Thumb.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
mc:Ignorable="d">

<Style TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="Auto" />
<Setter Property="Height" Value="Auto" />
<Setter Property="Background" Value="{DynamicResource TextBrushDarker}" />
<Setter Property="Template">
<Setter.Value>
Expand Down
57 changes: 57 additions & 0 deletions Magpie_Desktop/DerivedStyles/GridViewGroupStyle.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<Style x:Key="GridViewGroupStyle" TargetType="{x:Type GroupItem}">
<Setter Property="Foreground" Value="{DynamicResource DetailsViewGroupTextBrush}" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="FontSize" Value="{DynamicResource FontSizeLarge}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<ExpanderEx BorderThickness="0" SaveGameGroupId="{Binding Name, Mode=OneWay}"
IsExpanded="True" Background="Transparent" Padding="10">
<ExpanderEx.Header>
<Grid HorizontalAlignment="Stretch" Background="Transparent" Margin="0">
<Grid.ContextMenu>
<GameGroupMenu />
</Grid.ContextMenu>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Center" HorizontalAlignment="Left"
TextAlignment="Center" Margin="0,0,5,0" FontSize="{TemplateBinding FontSize}"
Typography.Capitals="SmallCaps" TextBlock.FontWeight="SemiBold">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="Text" Value="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" Value="{x:Null}">
<Setter Property="Text" Value="{DynamicResource LOCNone}" />
</DataTrigger>
<DataTrigger Binding="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" Value="">
<Setter Property="Text" Value="{DynamicResource LOCNone}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Grid.Column="1" Text="{Binding Items.Count, Mode=OneWay, StringFormat=({0})}"
Foreground="{DynamicResource DetailsViewGroupTextBrush}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Style="{DynamicResource BaseTextBlockStyle}"
DockPanel.Dock="Left" TextAlignment="Center"
Visibility="{Settings ShowGroupCount}" Margin="0,0,5,0"/>
<Separator Grid.Column="2" Background="{DynamicResource HoverBrush}" VerticalAlignment="Center"/>
</Grid>
</ExpanderEx.Header>
<ItemsPresenter />
</ExpanderEx>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion Magpie_Desktop/DerivedStyles/MainWindowStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</DockPanel>
<Border BorderBrush="{DynamicResource PopupBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="Transparent" CornerRadius="0" Margin="-1"
CornerRadius="0" Margin="-1"
IsHitTestVisible="False" Visibility="Visible"/>
</Grid>
</Border>
Expand Down
15 changes: 10 additions & 5 deletions Magpie_Desktop/Views/DetailsViewGameOverview.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@
<Setter Property="Margin" Value="0,0,20,0"/>
<Setter Property="MinWidth" Value="75"/>
</Style>
<Style TargetType="Button" BasedOn="{StaticResource SimpleButton}" >
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,20,0"/>
<Setter Property="MinWidth" Value="75"/>
</Style>
</StackPanel.Resources>
<StackPanel ToolTip="{DynamicResource LOCTimePlayed}">
<Label Name="PART_ElemPlayTime" Content="&#x23F3;"/>
Expand Down Expand Up @@ -563,7 +568,7 @@
</StackPanel>
<StackPanel ToolTip="{DynamicResource LOCCompletionStatus}">
<Label Name="PART_ElemCompletionStatus" Content="&#xE10B;"/>
<TextBlock Name="PART_TextCompletionStatus"/>
<Button Name="PART_ButtonCompletionStatus"/>
</StackPanel>
</StackPanel>

Expand Down Expand Up @@ -684,13 +689,13 @@

<Label Name="PART_ElemPlatform" Content="&#xEA32;" FontFamily="{DynamicResource FontIcoFont}"
ToolTip="{DynamicResource LOCPlatformTitle}"/>
<Button Name="PART_ButtonPlatform"/>
<ItemsControl Name="PART_ItemsPlatforms" />

<Label Name="PART_ElemReleaseDate" Content="&#x1F382;" ToolTip="{DynamicResource LOCGameReleaseDateTitle}"/>
<Button Name="PART_ButtonReleaseDate"/>

<Label Name="PART_ElemSeries" Content="&#xE158;" ToolTip="{DynamicResource LOCSeriesLabel}"/>
<Button Name="PART_ButtonSeries"/>
<ItemsControl Name="PART_ItemsSeries" />

<Label Name="PART_ElemDevelopers" Content="&#xE144;" ToolTip="{DynamicResource LOCDeveloperLabel}"/>
<ItemsControl Name="PART_ItemsDevelopers" />
Expand All @@ -699,10 +704,10 @@
<ItemsControl Name="PART_ItemsPublishers" />

<Label Name="PART_ElemAgeRating" Content="&#x26D4;" ToolTip="{DynamicResource LOCAgeRatingLabel}"/>
<Button Name="PART_ButtonAgeRating" />
<ItemsControl Name="PART_ItemsAgeRatings" />

<Label Name="PART_ElemRegion" Content="&#xE128;" ToolTip="{DynamicResource LOCRegionLabel}"/>
<Button Name="PART_ButtonRegion"/>
<ItemsControl Name="PART_ItemsRegions" />

<Label Name="PART_ElemCommunityScore" Content="&#xE125;" ToolTip="{DynamicResource LOCCommunityScore}"/>
<TextBlock Name="PART_TextCommunityScore" VerticalAlignment="Center"
Expand Down
17 changes: 12 additions & 5 deletions Magpie_Desktop/Views/GridViewGameOverview.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.Resources>
<Style TargetType="Button" BasedOn="{StaticResource SimpleButton}" >
<Setter Property="Margin" Value="0,0,10,10" />
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="MinWidth" Value="140"/>
</Style>
</Grid.Resources>
<WrapPanel HorizontalAlignment="Center">
<StackPanel>
<Label Name="PART_ElemPlayTime" Content="&#x23F3;" ToolTip="{DynamicResource LOCTimePlayed}"/>
Expand Down Expand Up @@ -528,7 +535,7 @@
</StackPanel>
<StackPanel>
<Label Name="PART_ElemCompletionStatus" Content="&#xE10B;" ToolTip="{DynamicResource LOCCompletionStatus}"/>
<TextBlock Name="PART_TextCompletionStatus" MinWidth="75"/>
<Button Name="PART_ButtonCompletionStatus" MinWidth="75"/>
</StackPanel>
</StackPanel>
</WrapPanel>
Expand Down Expand Up @@ -594,27 +601,27 @@
<StackPanel>
<Label Name="PART_ElemPlatform" Content="&#xEA32;" FontFamily="{DynamicResource FontIcoFont}"
ToolTip="{DynamicResource LOCPlatformTitle}"/>
<Button Name="PART_ButtonPlatform"/>
<ItemsControl Name="PART_ItemsPlatforms" />
</StackPanel>
<StackPanel>
<Label Name="PART_ElemReleaseDate" Content="&#x1F382;" ToolTip="{DynamicResource LOCGameReleaseDateTitle}"/>
<Button Name="PART_ButtonReleaseDate"/>
</StackPanel>
<StackPanel>
<Label Name="PART_ElemSeries" Content="&#xE158;" ToolTip="{DynamicResource LOCSeriesLabel}"/>
<Button Name="PART_ButtonSeries"/>
<ItemsControl Name="PART_ItemsSeries" />
</StackPanel>
<StackPanel>
<Label Name="PART_ElemAgeRating" Content="&#x26D4;" ToolTip="{DynamicResource LOCAgeRatingLabel}"/>
<Button Name="PART_ButtonAgeRating" />
<ItemsControl Name="PART_ItemsAgeRatings" />
</StackPanel>
<StackPanel>
<Label Name="PART_ElemVersion" Content="&#xE15E;" ToolTip="{DynamicResource LOCVersionLabel}"/>
<Button Name="PART_ButtonVersion"/>
</StackPanel>
<StackPanel>
<Label Name="PART_ElemRegion" Content="&#xE128;" ToolTip="{DynamicResource LOCRegionLabel}"/>
<Button Name="PART_ButtonRegion"/>
<ItemsControl Name="PART_ItemsRegions" />
</StackPanel>
</WrapPanel>
<WrapPanel>
Expand Down
3 changes: 2 additions & 1 deletion Magpie_Desktop/Views/LibraryDetailsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<ControlTemplate TargetType="{x:Type LibraryDetailsView}">
<DockPanel d:DesignWidth="1280" d:DesignHeight="960"
d:DataContext="{x:Static DesignMainViewModel.DesignIntance}">
<Grid>
<Grid DockPanel.Dock="{Settings DetailsListPosition}"
Width="{Settings DetailsListWitdh}">
<Border Background="{DynamicResource PanelBackgroundBrush}">
<ExtendedListBox x:Name="PART_ListGames" Padding="0,20,0,0"
SelectionMode="Extended"
Expand Down
13 changes: 10 additions & 3 deletions Magpie_Desktop/Views/LibraryGridView.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">

<Style TargetType="{x:Type LibraryGridView}">
<Setter Property="Template">
Expand All @@ -13,8 +13,12 @@
d:DataContext="{x:Static DesignMainViewModel.DesignIntance}">
<GridViewGameOverview x:Name="PART_ControlGameView"
Width="{Settings GrdiDetailsWitdh}"
DockPanel.Dock="{Settings GridViewDetailsPosition}" />
DockPanel.Dock="{Settings GridViewDetailsPosition}" />
<Grid DockPanel.Dock="Left">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
Expand All @@ -31,6 +35,9 @@
<GameListItem Style="{StaticResource GridViewItemTemplate}" />
</DataTemplate>
</ExtendedListBox.ItemTemplate>
<ExtendedListBox.GroupStyle>
<GroupStyle ContainerStyle="{StaticResource GridViewGroupStyle}"/>
</ExtendedListBox.GroupStyle>
<ExtendedListBox.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Type ScrollBar}}">
<Setter Property="Margin" Value="0,20,0,20"/>
Expand Down
Loading

0 comments on commit 136b2e9

Please sign in to comment.