Skip to content

Commit

Permalink
调整播放器中播放列表样式
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed May 17, 2024
1 parent 2e169ab commit e1f1239
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/BiliLite.UWP/Controls/PlayerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,26 @@
<ListView Margin="0 4" x:Name="EpisodeList" SelectionChanged="EpisodeList_SelectionChanged" >
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding title}" TextWrapping="Wrap" ToolTipService.ToolTip="{Binding title}"></TextBlock>
<StackPanel>
<Grid Visibility="{Binding ShowTitlePart}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding TitlePage}"
VerticalAlignment="Center"
Width="25">
</TextBlock>
<TextBlock Grid.Column="1"
Text="{Binding TitlePart}"
TextWrapping="Wrap" ></TextBlock>
</Grid>
<TextBlock
Visibility="{Binding ShowTitlePart,Converter={StaticResource display}}"
Text="{Binding title}"
TextWrapping="Wrap"
ToolTipService.ToolTip="{Binding title}"></TextBlock>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
Expand Down
6 changes: 6 additions & 0 deletions src/BiliLite.UWP/Models/Common/Video/PlayInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,11 @@ public class PlayInfo
public object parameter { get; set; }

public string area { get; set; } = "";

public string TitlePage { get; set; }

public string TitlePart { get; set; }

public bool ShowTitlePart => TitlePage != null;
}
}
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/Pages/VideoDetailPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ private void InitPlayInfo()
order = i,
play_mode = VideoPlayType.Video,
title = "P" + item.Page + " " + item.Part,
TitlePage = "P"+item.Page,
TitlePart = item.Part.TrimStart(' '),
area = m_viewModel.VideoInfo.Title.ParseArea(m_viewModel.VideoInfo.Owner.Mid)
});
i++;
Expand Down

0 comments on commit e1f1239

Please sign in to comment.