feat: Add macOS VLC native bundling and improve UI styling
- Added AsyncImageLoader package for improved image loading. - Implemented macOS native VLC library bundling with a script to fetch and copy necessary files. - Enhanced PlayerView UI with updated colors and improved layout for better user experience. - Refactored media playback logic in PlayerView to handle buffering and errors more gracefully. - Updated Playlists and Programs views to use consistent styling and improved text colors. - Introduced a new settings layout with better organization and visual appeal.
This commit is contained in:
@@ -1,67 +1,87 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="TV_Player.AvaloniaApp.Views.SettingsView">
|
||||
<Viewbox>
|
||||
<StackPanel VerticalAlignment="Center" Width="900">
|
||||
<TextBlock Margin="10"
|
||||
Foreground="White"
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel MaxWidth="700" HorizontalAlignment="Center" Margin="24" Spacing="16">
|
||||
|
||||
<TextBlock Foreground="#111827"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="25"
|
||||
FontSize="20"
|
||||
FontWeight="Bold"
|
||||
Text="Settings" />
|
||||
|
||||
<StackPanel Margin="10" Spacing="8">
|
||||
<TextBlock Foreground="White" FontSize="22" FontWeight="Bold" Text="Playlist URL" />
|
||||
<TextBox Text="{Binding PlaylistURL}" />
|
||||
<TextBlock Foreground="White" FontSize="22" FontWeight="Bold" Text="Playlist Name" />
|
||||
<TextBox Text="{Binding PlaylistName}" />
|
||||
<Button Width="70" Height="70" HorizontalAlignment="Center" Classes="icon-green" Command="{Binding AddPlaylistCommand}">
|
||||
<Viewbox Width="24" Height="24">
|
||||
<Path Fill="White" Data="M11 5H13V11H19V13H13V19H11V13H5V11H11V5Z" />
|
||||
<!-- Add Playlist Section -->
|
||||
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="16">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Foreground="#374151" FontSize="13" FontWeight="SemiBold" Text="Add Playlist" />
|
||||
<TextBlock Foreground="#6B7280" FontSize="12" Text="Playlist URL" />
|
||||
<TextBox Text="{Binding PlaylistURL}" />
|
||||
<TextBlock Foreground="#6B7280" FontSize="12" Text="Playlist Name" />
|
||||
<TextBox Text="{Binding PlaylistName}" />
|
||||
<Button Width="36" Height="36" HorizontalAlignment="Left" Classes="icon-green" Command="{Binding AddPlaylistCommand}">
|
||||
<Viewbox Width="14" Height="14">
|
||||
<Path Fill="White" Data="M11 5H13V11H19V13H13V19H11V13H5V11H11V5Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Playlists List -->
|
||||
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="8">
|
||||
<ListBox ItemsSource="{Binding Playlists}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBox.ItemContainerTheme>
|
||||
<ControlTheme TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="Padding" Value="8,4" />
|
||||
</ControlTheme>
|
||||
</ListBox.ItemContainerTheme>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid HorizontalAlignment="Stretch" Height="48" ColumnDefinitions="180,*,48">
|
||||
<TextBlock Foreground="#111827" VerticalAlignment="Center" FontSize="13" FontWeight="SemiBold" Text="{Binding Key}" TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock Grid.Column="1" Foreground="#4B5563" VerticalAlignment="Center" FontSize="12" Text="{Binding Value}" TextTrimming="CharacterEllipsis" />
|
||||
<Button Grid.Column="2"
|
||||
Width="32" Height="32"
|
||||
VerticalAlignment="Center"
|
||||
Classes="icon-red"
|
||||
CommandParameter="{Binding}"
|
||||
Command="{Binding DataContext.PlaylistDeleteCommand, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
||||
<Viewbox Width="12" Height="12">
|
||||
<Path Fill="White" Data="M5 11H19V13H5Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
<!-- Options -->
|
||||
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="16">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Foreground="#374151" FontSize="13" FontWeight="SemiBold" Text="Options" />
|
||||
<CheckBox Foreground="#111827" FontSize="13" IsChecked="{Binding StartFullScreen}" Content="Start fullscreen" />
|
||||
<CheckBox Foreground="#111827" FontSize="13" IsChecked="{Binding StartLastScreen}" Content="Remember last channel" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Actions -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10">
|
||||
<Button Width="36" Height="36" Classes="icon-neutral" Command="{Binding BackCommand}">
|
||||
<Viewbox Width="14" Height="14">
|
||||
<Path Fill="#374151" Data="M14.7 5.3L8 12L14.7 18.7L16.1 17.3L10.8 12L16.1 6.7Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Width="36" Height="36" Classes="icon-lightgreen" Command="{Binding SaveCommand}">
|
||||
<Viewbox Width="14" Height="14">
|
||||
<Path Fill="White" Data="M9 16.2L4.8 12L3.4 13.4L9 19L21 7L19.6 5.6Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<ListBox Height="250"
|
||||
ItemsSource="{Binding Playlists}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid HorizontalAlignment="Stretch" Height="80" ColumnDefinitions="200,*,100">
|
||||
<TextBlock Foreground="White" VerticalAlignment="Center" FontSize="25" FontWeight="Bold" Text="{Binding Key}" />
|
||||
<TextBlock Grid.Column="1" Foreground="White" VerticalAlignment="Center" FontSize="25" FontWeight="Bold" Text="{Binding Value}" />
|
||||
<Button Grid.Column="2"
|
||||
Width="70"
|
||||
Height="70"
|
||||
Classes="icon-red"
|
||||
CommandParameter="{Binding}"
|
||||
Command="{Binding DataContext.PlaylistDeleteCommand, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
||||
<Viewbox Width="24" Height="24">
|
||||
<Path Fill="White" Data="M5 11H19V13H5Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartFullScreen}" Content="Fullscreen" />
|
||||
<CheckBox Margin="10" Foreground="White" FontSize="25" IsChecked="{Binding StartLastScreen}" Content="Remember last" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Width="70" Height="70" Margin="10,0,50,0" Classes="icon-yellow" Command="{Binding BackCommand}">
|
||||
<Viewbox Width="24" Height="24">
|
||||
<Path Fill="Gray" Data="M14.7 5.3L8 12L14.7 18.7L16.1 17.3L10.8 12L16.1 6.7Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Width="70" Height="70" Classes="icon-lightgreen" Command="{Binding SaveCommand}">
|
||||
<Viewbox Width="24" Height="24">
|
||||
<Path Fill="Gray" Data="M9 16.2L4.8 12L3.4 13.4L9 19L21 7L19.6 5.6Z" />
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Viewbox>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user