Skip to content

Commit

Permalink
修复预览图居中显示
Browse files Browse the repository at this point in the history
  • Loading branch information
ProJend committed Jan 8, 2025
1 parent 512aebd commit 85ff2be
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/BiliLite.UWP/Pages/Home/AnimePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<Grid>
<toolkit:ImageEx
MaxHeight="240"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='300w'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -98,6 +100,8 @@
Click="BannerItem_Click"
CornerRadius="{ThemeResource OverlayCornerRadius}">
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
CornerRadius="{ThemeResource OverlayCornerRadius}"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{Binding Path=Img, Converter={StaticResource imageConvert}, ConverterParameter='240h'}"
Expand Down Expand Up @@ -170,6 +174,8 @@
<Grid>
<toolkit:ImageEx
MinHeight="132"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=NewEp.cover, Converter={StaticResource imageConvert}, ConverterParameter='320w_200h_1c'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -260,6 +266,8 @@
</Grid.RowDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{Binding Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='300w'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -408,6 +416,8 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='180h'}"
Stretch="UniformToFill" />
Expand Down
6 changes: 6 additions & 0 deletions src/BiliLite.UWP/Pages/Home/DynamicPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
</Grid.ColumnDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Video.Pic, Converter={StaticResource imageConvert}, ConverterParameter='120h'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -112,6 +114,8 @@
</Grid.ColumnDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=UgcSeason.Pic, Converter={StaticResource imageConvert}, ConverterParameter='120h'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -162,6 +166,8 @@
</Grid.ColumnDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Season.Cover, Converter={StaticResource imageConvert}, ConverterParameter='120h'}"
Stretch="UniformToFill" />
Expand Down
5 changes: 4 additions & 1 deletion src/BiliLite.UWP/Pages/Home/HotPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
x:Name="HotGridView"
Padding="10,0"
CanLoadMore="True"
DesiredWidth="400"
DesiredWidth="550"
IsItemClickEnabled="True"
ItemClick="gridHot_ItemClick"
ItemContainerStyle="{StaticResource DefaultGridViewItem}"
Expand Down Expand Up @@ -51,6 +51,9 @@
</Grid.ColumnDefinitions>
<Grid>
<toolkit:ImageEx
Height="100"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='120h'}"
Stretch="UniformToFill" />
Expand Down
8 changes: 8 additions & 0 deletions src/BiliLite.UWP/Pages/Home/LivePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
Click="BannerItem_Click"
CornerRadius="{ThemeResource OverlayCornerRadius}">
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
CornerRadius="{ThemeResource OverlayCornerRadius}"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{Binding Path=Pic, Converter={StaticResource imageConvert}, ConverterParameter='240h'}"
Expand All @@ -58,6 +60,8 @@
<toolkit:ImageEx
Width="48"
Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
CornerRadius="{StaticResource ImageCornerRadius}"
PlaceholderSource="/assets/Thumbnails/Placeholde1x1.png"
PlaceholderStretch="UniformToFill"
Expand Down Expand Up @@ -103,6 +107,8 @@
<toolkit:ImageEx
Width="260"
Height="160"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=cover, Converter={StaticResource imageConvert}, ConverterParameter='460w_260h_1c'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -213,6 +219,8 @@
<toolkit:ImageEx
Width="260"
Height="160"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='460w_260h_1c'}"
Stretch="UniformToFill" />
Expand Down
12 changes: 12 additions & 0 deletions src/BiliLite.UWP/Pages/Home/MoviePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<Grid>
<toolkit:ImageEx
MaxHeight="240"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='200w'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -87,6 +89,8 @@
<toolkit:ImageEx
Width="200"
MinHeight="132"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='200w'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -160,6 +164,8 @@
Click="BannerItem_Click"
CornerRadius="{ThemeResource OverlayCornerRadius}">
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
CornerRadius="{ThemeResource OverlayCornerRadius}"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{Binding Path=Img, Converter={StaticResource imageConvert}, ConverterParameter='240h'}"
Expand Down Expand Up @@ -231,6 +237,8 @@
<toolkit:ImageEx
Width="200"
MinHeight="132"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=NewEp.cover, Converter={StaticResource imageConvert}, ConverterParameter='320w_200h_1c'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -309,6 +317,8 @@
<Grid>
<toolkit:ImageEx
MaxHeight="240"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='200w'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -520,6 +530,8 @@
<!--<RowDefinition Height="48"/>-->
</Grid.RowDefinitions>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='180h'}"
Stretch="UniformToFill" />
Expand Down
6 changes: 6 additions & 0 deletions src/BiliLite.UWP/Pages/Home/RecommendPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
</Grid.RowDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='200h'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -157,6 +159,8 @@
</Grid.ColumnDefinitions>
<Grid Width="160">
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='200h'}"
Stretch="UniformToFill" />
Expand Down Expand Up @@ -280,6 +284,8 @@
Click="BannerItem_Click"
CornerRadius="{ThemeResource OverlayCornerRadius}">
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
CornerRadius="{ThemeResource OverlayCornerRadius}"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Image, Converter={StaticResource imageConvert}, ConverterParameter='240h'}"
Expand Down
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/Pages/RankPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
</Grid.ColumnDefinitions>
<Grid>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Pic, Converter={StaticResource imageConvert}, ConverterParameter='120h'}"
Stretch="UniformToFill" />
Expand Down
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/Pages/User/HistoryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
</MenuFlyout>
</Grid.ContextFlyout>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="/Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=Cover, Converter={StaticResource imageConvert}, ConverterParameter='180w_100h_1c'}"
Stretch="UniformToFill" />
Expand Down
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/Pages/User/WatchlaterPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
</MenuFlyout>
</Grid.ContextFlyout>
<toolkit:ImageEx
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderSource="ms-appx:///Assets/Thumbnails/Placeholde.png"
Source="{x:Bind Path=pic, Converter={StaticResource imageConvert}, ConverterParameter='160w'}"
Stretch="UniformToFill" />
Expand Down

0 comments on commit 85ff2be

Please sign in to comment.