Skip to content

Commit

Permalink
Added: Support to use web view component from Web Explorer extension
Browse files Browse the repository at this point in the history
  • Loading branch information
darklinkpower committed Nov 13, 2024
1 parent 0c4226b commit 30acd11
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 16 deletions.
2 changes: 2 additions & 0 deletions source/Constants.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
<sys:Int32 x:Key="GridViewSectionOrderCheckDlc">11</sys:Int32>
<sys:Int32 x:Key="GridViewSectionOrderGameRelations">12</sys:Int32>
<sys:Int32 x:Key="GridViewSectionOrderSteamScreenshots">13</sys:Int32>
<sys:Int32 x:Key="GridViewSectionOrderWeb">14</sys:Int32>
<sys:Double x:Key="WebExplorerControlHeight">800</sys:Double>
<sys:Boolean x:Key="GridViewCoverZoomOnHover">False</sys:Boolean>
<sys:Boolean x:Key="SidebarUseTransparentBackground">False</sys:Boolean>
<sys:Boolean x:Key="ShowNavigationButtons">True</sys:Boolean>
Expand Down
17 changes: 15 additions & 2 deletions source/Views/DetailsViewGameOverview.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1335,8 +1335,21 @@
</TabItem>
<!--#endregion-->



<!--#region WebExplorer-->
<TabItem Visibility="{Binding ElementName=WebExplorer_BrowserHostViewControl, Path=Content.IsControlVisible, Converter={StaticResource BooleanToVisibilityConverter}, TargetNullValue=Collapsed, FallbackValue=Collapsed}">
<TabItem.Header>
<TextBlock Style="{DynamicResource DetailsViewTabHeaderStyle}" Text="{DynamicResource LOCWebExplorer_WebLabel}" />
</TabItem.Header>
<Grid Margin="0,15,0,15" SnapsToDevicePixels="True" UseLayoutRounding="True">
<Border Background="{DynamicResource DetailsViewSectionBackgroundBrush}"
CornerRadius="{DynamicResource DetailsViewCoverCornerRadius}" />
<ContentControl x:Name="WebExplorer_BrowserHostViewControl"
SnapsToDevicePixels="True" UseLayoutRounding="True"
Height="{DynamicResource WebExplorerControlHeight}"
Margin="0,5,0,5" />
</Grid>
</TabItem>
<!--#endregion-->

</TabControl>

Expand Down
26 changes: 26 additions & 0 deletions source/Views/GridViewGameOverview.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Expander
Grid.Row="{DynamicResource GridViewSectionOrderDetails}"
Expand Down Expand Up @@ -1127,6 +1132,27 @@
<ContentControl x:Name="SteamScreenshots_SteamScreenshotsViewControl" Margin="0,10,20,0" />
</StackPanel>
</Expander>

<Expander
Grid.Row="{DynamicResource GridViewSectionOrderWeb}"
Margin="0,0,5,0"
IsExpanded="True"
Visibility="{Binding ElementName=WebExplorer_BrowserHostViewControl, Path=Content.IsControlVisible, Converter={StaticResource BooleanToVisibilityConverter}, TargetNullValue=Collapsed, FallbackValue=Collapsed}">
<Expander.Header>
<TextBlock
Cursor="Hand"
FontSize="{DynamicResource FontSizeLarge}"
FontWeight="Medium"
Style="{DynamicResource BaseTextBlockStyle}"
Text="{DynamicResource LOCWebExplorer_WebLabel}" />
</Expander.Header>
<StackPanel Margin="0,0,0,25">
<Separator Margin="0,5,0,5" Background="{DynamicResource GridViewSeparatorBrush}" />
<ContentControl x:Name="WebExplorer_BrowserHostViewControl"
Height="{DynamicResource WebExplorerControlHeight}"
Margin="0,5,0,5" />
</StackPanel>
</Expander>
</Grid>
</ScrollViewer>
</DockPanel>
Expand Down
30 changes: 16 additions & 14 deletions source/thememodifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Constants:
- DetailsViewDetailsIconsVisibility: 'Visibility of icons in details'
- DetailsViewAllowUseOfLogos: 'Allow use of logos (Requires Extra Metadata Loader extension)'
- DetailsViewLibraryGameShowFavorite: 'Show favorites icon in game list'
- WebExplorerControlHeight(400,1800): 'Web view component height (Requires Web Explorer extension)'
- "Grid View Details"
- GridViewPlaceDescriptionAtBottom: 'Place game description at the bottom'
- GridViewDetailsIconsVisibility: 'Visibility of icons in details'
Expand All @@ -31,17 +32,18 @@ Constants:
- GridViewCoverUseRoundedCorners: 'Use rounded corners (Can cause performance degradation)'
- GridViewCoverDisplayDropShadowEffect: 'Use dropshadow effect (Can cause performance degradation)'
- "Grid View Details sections order"
- GridViewSectionOrderDetails(0,14): 'Game Details'
- GridViewSectionOrderVideo(0,14): 'ExtraMetadata extension video'
- GridViewSectionOrderNotes(0,14): 'Game Notes'
- GridViewSectionOrderDescription(0,14): 'Game Description'
- GridViewSectionOrderVndb(0,14): 'VNDB Nexus extension'
- GridViewSectionOrderSuccessStory(0,14): 'SuccessStory extension'
- GridViewSectionOrderHowLongToBeat(0,14): 'HowLongToBeat extension'
- GridViewSectionOrderScreenshotsVisualizer(0,14): 'ScreenshotsVisualizer extension'
- GridViewSectionOrderGameActivity(0,14): 'GameActivity extension'
- GridViewSectionOrderReviewViewer(0,14): 'ReviewViewer extension'
- GridViewSectionOrderNewsViewer(0,14): 'NewsViewer extension'
- GridViewSectionOrderCheckDlc(0,14): 'CheckDlc extension'
- GridViewSectionOrderGameRelations(0,14): 'Game Relations extension'
- GridViewSectionOrderSteamScreenshots(0,14): 'Steam Screenshots extension'
- GridViewSectionOrderDetails(0,18): 'Game Details'
- GridViewSectionOrderVideo(0,18): 'ExtraMetadata extension video'
- GridViewSectionOrderNotes(0,18): 'Game Notes'
- GridViewSectionOrderDescription(0,18): 'Game Description'
- GridViewSectionOrderVndb(0,18): 'VNDB Nexus extension'
- GridViewSectionOrderSuccessStory(0,18): 'SuccessStory extension'
- GridViewSectionOrderHowLongToBeat(0,18): 'HowLongToBeat extension'
- GridViewSectionOrderScreenshotsVisualizer(0,18): 'ScreenshotsVisualizer extension'
- GridViewSectionOrderGameActivity(0,18): 'GameActivity extension'
- GridViewSectionOrderReviewViewer(0,18): 'ReviewViewer extension'
- GridViewSectionOrderNewsViewer(0,18): 'NewsViewer extension'
- GridViewSectionOrderCheckDlc(0,18): 'CheckDlc extension'
- GridViewSectionOrderGameRelations(0,18): 'Game Relations extension'
- GridViewSectionOrderSteamScreenshots(0,18): 'Steam Screenshots extension'
- GridViewSectionOrderWeb(0,18): 'Web Explorer extension'

0 comments on commit 30acd11

Please sign in to comment.