mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 10:51:52 -05:00
Undo April Fool's changes
This commit is contained in:
parent
11e1b336c7
commit
82dd9feb5e
7 changed files with 83 additions and 56 deletions
|
@ -0,0 +1,8 @@
|
|||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="FRESHMusicPlayer.Views.LibraryTab">
|
||||
Welcome to Avalonia!
|
||||
</UserControl>
|
|
@ -0,0 +1,19 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace FRESHMusicPlayer.Views
|
||||
{
|
||||
public partial class LibraryTab : UserControl
|
||||
{
|
||||
public LibraryTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
</DockPanel>
|
||||
<!--Controls Box-->
|
||||
<Border x:Name="ControlsBoxBorder" Height="84" BorderBrush="White" BorderThickness="0, 1, 0, 0" DockPanel.Dock="Bottom" RenderTransformOrigin="0.5,0.5">
|
||||
<Border x:Name="ControlsBoxBorder" BorderThickness="1" Height="84" BorderBrush="{StaticResource ControlBoxColor}" DockPanel.Dock="Bottom" RenderTransformOrigin="0.5,0.5">
|
||||
<Grid x:Name="ControlsBox" DockPanel.Dock="Bottom" Background="{StaticResource ControlBoxColor}" Margin="0,0,0,-2" Drop="ControlsBox_Drop">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -78,8 +78,8 @@
|
|||
</Image.ToolTip>
|
||||
</Image>
|
||||
<TextBlock x:Name="TitleLabel" HorizontalAlignment="Stretch" Margin="5,5,40,0" TextWrapping="NoWrap" Text="{x:Static resx:Resources.MAINWINDOW_NOTHINGPLAYING}" VerticalAlignment="Top" FontWeight="Bold" FontSize="22" Grid.Column="1" Height="30" Foreground="{StaticResource PrimaryTextColor}" TextTrimming="CharacterEllipsis" MouseLeftButtonDown="TrackTitle_MouseLeftButtonDown" MouseRightButtonDown="TrackTitle_MouseRightButtonDown" Cursor="Hand" Grid.ColumnSpan="2" Panel.ZIndex="0"/>
|
||||
<Slider x:Name="ProgressBar" Grid.Column="1" HorizontalAlignment="Stretch" Margin="50,54,45,0" VerticalAlignment="Top" Height="21" Style="{StaticResource Progress_Slider}" Value="9.8" Thumb.DragStarted="ProgressBar_DragStarted" Thumb.DragCompleted="ProgressBar_DragCompleted" ValueChanged="ProgressBar_ValueChanged" IsMoveToPointEnabled="True" MouseLeftButtonUp="ProgressBar_MouseLeftButtonUp" Cursor="Hand"/>
|
||||
<TextBlock x:Name="ProgressIndicator1" Grid.Column="1" Margin="5,56,0,0" TextWrapping="NoWrap" Text="10:00" Foreground="{StaticResource SecondaryTextColor}" Height="15" VerticalAlignment="Top" HorizontalAlignment="Left" Width="35"/>
|
||||
<Slider x:Name="ProgressBar" Grid.Column="1" HorizontalAlignment="Stretch" Margin="37,54,45,0" VerticalAlignment="Top" Height="21" Style="{StaticResource Progress_Slider}" Value="9.8" Thumb.DragStarted="ProgressBar_DragStarted" Thumb.DragCompleted="ProgressBar_DragCompleted" ValueChanged="ProgressBar_ValueChanged" IsMoveToPointEnabled="True" MouseLeftButtonUp="ProgressBar_MouseLeftButtonUp" Cursor="Hand"/>
|
||||
<TextBlock x:Name="ProgressIndicator1" Grid.Column="1" Margin="5,56,0,0" TextWrapping="NoWrap" Text="10:00" Foreground="{StaticResource SecondaryTextColor}" Height="15" VerticalAlignment="Top" HorizontalAlignment="Left" Width="28"/>
|
||||
<TextBlock x:Name="ProgressIndicator2" Grid.Column="1" Margin="0,0,0,13" TextWrapping="NoWrap" Text="10:00" Foreground="{StaticResource SecondaryTextColor}" Height="15" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="40" MouseLeftButtonDown="ProgressIndicator2_MouseLeftButtonDown"/>
|
||||
<TextBlock x:Name="ArtistLabel" HorizontalAlignment="Stretch" Margin="5,35,10,0" TextWrapping="NoWrap" Text="{x:Static resx:Resources.MAINWINDOW_NOTHINGPLAYING}" VerticalAlignment="Top" Grid.Column="1" Height="20" Foreground="{StaticResource SecondaryTextColor}" TextTrimming="CharacterEllipsis"/>
|
||||
|
||||
|
@ -147,10 +147,8 @@
|
|||
</Slider>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border x:Name="RightFrameBorder" BorderBrush="White" BorderThickness="1,0,0,0">
|
||||
<ContentControl x:Name="RightFrame" />
|
||||
</Border>
|
||||
|
||||
<ContentControl x:Name="RightFrame" DockPanel.Dock="Right" Visibility="Collapsed" Width="235"/>
|
||||
|
||||
<ContentControl x:Name="ContentFrame"/>
|
||||
|
||||
|
||||
|
|
|
@ -245,9 +245,9 @@ namespace FRESHMusicPlayer
|
|||
}
|
||||
if (CurrentPane != Pane.None) await HideAuxilliaryPane(true);
|
||||
|
||||
if (!openleft) DockPanel.SetDock(RightFrameBorder, Dock.Right); else DockPanel.SetDock(RightFrameBorder, Dock.Left);
|
||||
RightFrameBorder.Visibility = Visibility.Visible;
|
||||
RightFrameBorder.Width = width;
|
||||
if (!openleft) DockPanel.SetDock(RightFrame, Dock.Right); else DockPanel.SetDock(RightFrame, Dock.Left);
|
||||
RightFrame.Visibility = Visibility.Visible;
|
||||
RightFrame.Width = width;
|
||||
RightFrame.Content = GetPageForPane(pane);
|
||||
|
||||
var sb = InterfaceUtils.GetThicknessAnimation(
|
||||
|
@ -257,7 +257,7 @@ namespace FRESHMusicPlayer
|
|||
new PropertyPath(MarginProperty),
|
||||
new ExponentialEase { EasingMode = EasingMode.EaseOut, Exponent = 3 });
|
||||
|
||||
sb.Begin(RightFrameBorder);
|
||||
sb.Begin(RightFrame);
|
||||
|
||||
CurrentPane = pane;
|
||||
}
|
||||
|
@ -265,13 +265,13 @@ namespace FRESHMusicPlayer
|
|||
{
|
||||
var sb = InterfaceUtils.GetThicknessAnimation(
|
||||
new Thickness(0),
|
||||
DockPanel.GetDock(RightFrameBorder) == Dock.Left ? new Thickness(RightFrameBorder.Width * -1, 0, 0, 0) : new Thickness(0, 0, RightFrameBorder.Width * -1, 0),
|
||||
DockPanel.GetDock(RightFrame) == Dock.Left ? new Thickness(RightFrame.Width * -1, 0, 0, 0) : new Thickness(0, 0, RightFrame.Width * -1, 0),
|
||||
TimeSpan.FromMilliseconds(120),
|
||||
new PropertyPath(MarginProperty),
|
||||
new ExponentialEase { EasingMode = EasingMode.EaseIn, Exponent = 3 });
|
||||
|
||||
if (animate) await sb.BeginStoryboardAsync(RightFrameBorder);
|
||||
RightFrameBorder.Visibility = Visibility.Collapsed;
|
||||
if (animate) await sb.BeginStoryboardAsync(RightFrame);
|
||||
RightFrame.Visibility = Visibility.Collapsed;
|
||||
RightFrame.Content = null;
|
||||
CurrentPane = Pane.None;
|
||||
}
|
||||
|
|
|
@ -17,16 +17,14 @@
|
|||
<ColumnDefinition x:Name="LeftSide" Width="222"/>
|
||||
<ColumnDefinition x:Name="RightSide"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="1" BorderBrush="White" BorderThickness="1, 0, 0, 1">
|
||||
<ListBox x:Name="TracksPanel" Grid.Column="1" Background="{StaticResource BackgroundColor}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Stretch" Padding="0" Margin="0" VirtualizingPanel.IsVirtualizing="True" BorderBrush="{StaticResource BackgroundColor}" ScrollViewer.PanningMode="Both">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
<ListBox x:Name="TracksPanel" Grid.Column="1" Background="{StaticResource BackgroundColor}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Stretch" Padding="0" Margin="0" VirtualizingPanel.IsVirtualizing="True" BorderBrush="{StaticResource BackgroundColor}" ScrollViewer.PanningMode="Both">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
|
||||
<GridSplitter
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
|
@ -38,14 +36,13 @@
|
|||
/>
|
||||
<ListBox x:Name="CategoryPanel" Margin="0,0,5,0" Background="{StaticResource SecondaryColor}" Foreground="{StaticResource PrimaryTextColor}" Grid.RowSpan="2" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" FontSize="14" VirtualizingPanel.IsVirtualizing="True" BorderBrush="{x:Null}" SelectionChanged="CategoryPanel_SelectionChanged" BorderThickness="0" ScrollViewer.PanningMode="Both"/>
|
||||
|
||||
<Border BorderBrush="White" BorderThickness="1, 0, 0, 0" Grid.Column="1" Grid.Row="2">
|
||||
<Grid x:Name="InfoPanel" Grid.Column="1" Grid.Row="2" Margin="0" Height="45" Background="{StaticResource BackgroundColor}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Grid.RowDefinitions>
|
||||
<Grid x:Name="InfoPanel" Grid.Column="1" Grid.Row="2" Margin="0" Height="45" Background="{StaticResource BackgroundColor}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="45"/>
|
||||
</Grid.RowDefinitions>-->
|
||||
|
@ -65,11 +62,11 @@
|
|||
</ComboBox>
|
||||
</DockPanel>-->
|
||||
|
||||
<TextBlock x:Name="InfoLabel" Text="99 Tracks ・ 10:00:00" Grid.Column="0" Foreground="{StaticResource SecondaryTextColor}" Grid.Row="2" FontSize="12" Margin="10" VerticalAlignment="Center"/>
|
||||
<Button x:Name="QueueAllButton" Content="{x:Static resx:Resources.LIBRARY_ENQUEUEALL}" Grid.Column="1" Grid.Row="2" Margin="10,10,0,10" Padding="5,1" Click="QueueAllButton_Click"/>
|
||||
<Button x:Name="PlayAllButton" Content="{x:Static resx:Resources.LIBRARY_PLAYALL}" Grid.Column="2" Grid.Row="2" Margin="10" Padding="5,1" Click="PlayAllButton_Click"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<TextBlock x:Name="InfoLabel" Text="99 Tracks ・ 10:00:00" Grid.Column="0" Foreground="{StaticResource SecondaryTextColor}" Grid.Row="2" FontSize="12" Margin="10" VerticalAlignment="Center"/>
|
||||
<Button x:Name="QueueAllButton" Content="{x:Static resx:Resources.LIBRARY_ENQUEUEALL}" Grid.Column="1" Grid.Row="2" Margin="10,10,0,10" Padding="5,1" Click="QueueAllButton_Click"/>
|
||||
<Button x:Name="PlayAllButton" Content="{x:Static resx:Resources.LIBRARY_PLAYALL}" Grid.Column="2" Grid.Row="2" Margin="10" Padding="5,1" Click="PlayAllButton_Click"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
xmlns:local="clr-namespace:FRESHMusicPlayer">
|
||||
<SolidColorBrush x:Key="PrimaryTextColor" Color="White"/>
|
||||
<SolidColorBrush x:Key="SecondaryTextColor" Color="#DADADA"/>
|
||||
<SolidColorBrush x:Key="ControlBoxColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="NavBarColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="ForegroundColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="SecondaryColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="BackgroundColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="ControlColor" Color="#282828"/>
|
||||
<SolidColorBrush x:Key="ControlBoxColor" Color="#2C2F33"/>
|
||||
<SolidColorBrush x:Key="NavBarColor" Color="Black"/>
|
||||
<SolidColorBrush x:Key="ForegroundColor" Color="#2C2F33"/>
|
||||
<SolidColorBrush x:Key="SecondaryColor" Color="#323539"/>
|
||||
<SolidColorBrush x:Key="BackgroundColor" Color="Black"/>
|
||||
<SolidColorBrush x:Key="ControlColor" Color="#40444A"/>
|
||||
</ResourceDictionary>
|
|
@ -1,22 +1,19 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
>
|
||||
<Style x:Key="{x:Type TextBlock}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontFamily" Value="Contemporary"/>
|
||||
</Style>
|
||||
<!--Button-->
|
||||
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Background" Value="#FF338BC1"/>
|
||||
<Setter Property="Background" Value="{StaticResource ControlColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource PrimaryTextColor}"/>
|
||||
<Setter Property="Padding" Value="20,5"/>
|
||||
<Setter Property="Padding" Value="20,1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid x:Name="grid">
|
||||
<Border x:Name="border"
|
||||
CornerRadius="0"
|
||||
CornerRadius="2"
|
||||
BorderBrush="{TemplateBinding Background}"
|
||||
TextElement.Foreground="{TemplateBinding Foreground}"
|
||||
BorderThickness="1"
|
||||
|
@ -206,7 +203,7 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="{StaticResource SecondaryColor}" Height="6"/>
|
||||
<Border Background="{StaticResource SecondaryColor}" Height="3"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
@ -222,7 +219,7 @@
|
|||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
|
||||
<GradientStop Color="#FF338BC1" Offset="0"/>
|
||||
<GradientStop Color="#FF338BC1" Offset="1"/>
|
||||
<GradientStop Color="#FF69B578" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
|
@ -237,8 +234,8 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Rectangle x:Name="ThumbEllipse" Height="15" Width="15" Fill="#FF338BC1">
|
||||
<Rectangle.Triggers>
|
||||
<Ellipse x:Name="ThumbEllipse" Height="15" Width="15" Fill="#FF338BC1">
|
||||
<Ellipse.Triggers>
|
||||
<EventTrigger RoutedEvent="MouseEnter">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
|
@ -267,8 +264,8 @@
|
|||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</Rectangle.Triggers>
|
||||
</Rectangle>
|
||||
</Ellipse.Triggers>
|
||||
</Ellipse>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
@ -463,9 +460,17 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBoxBase}">
|
||||
<Border x:Name="TextBorder" CornerRadius="0" Background="{StaticResource ControlColor}" BorderBrush="White" BorderThickness="1, 0, 0, 1">
|
||||
<Border x:Name="TextBorder" CornerRadius="2" Background="{StaticResource ControlColor}" BorderBrush="{StaticResource ControlColor}" BorderThickness="2">
|
||||
<ScrollViewer Margin="0" x:Name="PART_ContentHost" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="TextBorder" Property="BorderBrush" Value="#FF338BC1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsFocused" Value="true">
|
||||
<Setter TargetName="TextBorder" Property="BorderBrush" Value="#FF338BC1"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
Loading…
Reference in a new issue