Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme Extras crashes Playnite in custom theme #14

Open
azuravian opened this issue Feb 7, 2024 · 0 comments
Open

Theme Extras crashes Playnite in custom theme #14

azuravian opened this issue Feb 7, 2024 · 0 comments

Comments

@azuravian
Copy link

azuravian commented Feb 7, 2024

I'm working through a custom theme and wanted to add icons to links as provided by the ThemeExtras_Links content control.

As opposed to the vertical list presented, I made a horizontal stackpanel to hold the items. For the most part, this works fine, but whenever I do certain functions (usually related to other plugins) Theme Extras crashes Playnite with the Whoops message.

My Grid for ThemeExtras_Links looks like this:

<Grid Margin="0,10,0,5" Height="35" Background="{DynamicResource NormalBrushDark}">
	<ContentControl x:Name="ThemeExtras_Links"
					Visibility="{PluginStatus Plugin=felixkmh_Extras_Plugin, Status=Installed}">
		<ContentControl.Resources>
			<Style TargetType="ItemsControl">
				<Setter Property="ItemsPanel">
					<Setter.Value>
						<ItemsPanelTemplate>
							<StackPanel Orientation="Horizontal"/>
						</ItemsPanelTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="ItemTemplate">
					<Setter.Value>
						<DataTemplate>
							<DockPanel Margin="5">
								<Viewbox DockPanel.Dock="Left" Margin="0,0,5,0" Width="18" Height="18">
									<ContentControl>
										<ContentControl.Content>
											<Binding Path="Icon">
												<Binding.TargetNullValue>
													<TextBlock Text="&#xEF71;" 
															   Style="{DynamicResource BaseTextBlockStyle}" 
															   FontFamily="{StaticResource FontIcoFont}"/>
												</Binding.TargetNullValue>
											</Binding>
										</ContentControl.Content>
									</ContentControl>
								</Viewbox>
								<TextBlock DockPanel.Dock="Left" 
										   VerticalAlignment="Center" 
										   TextTrimming="CharacterEllipsis"
										   ToolTip="{Binding Url}" Margin="0,0,10,0">
									<Hyperlink Command="{Binding OpenLinkCommand}">
										<Run Text="{Binding Name}"/>
									</Hyperlink>    
								</TextBlock>
							</DockPanel>
						</DataTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</ContentControl.Resources>
	</ContentControl>
</Grid>

I have also attached two crash reports from Playnite, one crashed when using the "Copy Info to other Copies" function in DuplicateHider, the other when downloading SuccessStory Achievements for a game.

The crashes always occur after the other function is completed and control of the UI is going back to the user.
Theme_Extras_Crash_SS.zip
Theme_Extras_Crash_DH.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant