Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Apr 12, 2024
1 parent 4011a9a commit 499235a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 44 deletions.
1 change: 0 additions & 1 deletion YoutubeDownloader/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using Avalonia.Platform;
using Avalonia.Styling;
using AvaloniaWebView;
using Material.Styles.Themes;
using Microsoft.Extensions.DependencyInjection;
Expand Down
4 changes: 2 additions & 2 deletions YoutubeDownloader/Views/Components/DashboardView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
Width="256"
Height="256"
HorizontalAlignment="Center"
Foreground="{DynamicResource MaterialDesignDivider}"
Foreground="{DynamicResource MaterialDividerBrush}"
Kind="Youtube" />

<TextBlock
Expand Down Expand Up @@ -171,7 +171,7 @@
<DataTemplate>
<TextBlock
FontSize="14"
Foreground="{DynamicResource MaterialDesignBody}"
Foreground="{DynamicResource MaterialBodyBrush}"
Text="{Binding FileName}"
TextTrimming="CharacterEllipsis"
ToolTip.Tip="{Binding FileName}" />
Expand Down
4 changes: 2 additions & 2 deletions YoutubeDownloader/Views/Dialogs/AuthSetupView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Content -->
<Border
Grid.Row="1"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderBrush="{DynamicResource MaterialDividerBrush}"
BorderThickness="0,1">
<Panel>
<!-- Current auth status -->
Expand All @@ -36,7 +36,7 @@
Width="196"
Height="196"
HorizontalAlignment="Center"
Foreground="{DynamicResource MaterialDesignDivider}"
Foreground="{DynamicResource MaterialDividerBrush}"
Kind="AccountCheck" />

<TextBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<!-- Videos -->
<Border
Grid.Row="1"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderBrush="{DynamicResource MaterialDividerBrush}"
BorderThickness="0,1">
<ListBox
ItemsSource="{Binding AvailableVideos}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<!-- Thumbnail -->
<Border
Grid.Row="1"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderBrush="{DynamicResource MaterialDividerBrush}"
BorderThickness="0,1">
<Image asyncImageLoader:ImageLoader.Source="{Binding Video, Converter={x:Static converters:VideoToHighestQualityThumbnailUrlConverter.Instance}}" />
</Border>
Expand Down
5 changes: 2 additions & 3 deletions YoutubeDownloader/Views/Dialogs/MessageBoxView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dialogs="clr-namespace:YoutubeDownloader.ViewModels.Dialogs"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
Width="500"
x:DataType="dialogs:MessageBoxViewModel">
Width="500">
<Design.DataContext>
<dialogs:MessageBoxViewModel />
</Design.DataContext>
Expand All @@ -25,7 +24,7 @@
<Border
Grid.Row="1"
Padding="0,8"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderBrush="{DynamicResource MaterialDividerBrush}"
BorderThickness="0,1">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<TextBlock
Expand Down
43 changes: 9 additions & 34 deletions YoutubeDownloader/Views/Dialogs/SettingsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dialogs="clr-namespace:YoutubeDownloader.ViewModels.Dialogs"
Width="380"
x:DataType="dialogs:SettingsViewModel">
Width="380">
<Design.DataContext>
<dialogs:SettingsViewModel />
</Design.DataContext>
Expand All @@ -20,16 +19,12 @@
<Border
Grid.Row="1"
Padding="0,8"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderBrush="{DynamicResource MaterialDividerBrush}"
BorderThickness="0,1">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical">
<!-- Auto-updates -->
<DockPanel
Background="Transparent"
IsVisible="{OnPlatform False,
Windows=True}"
LastChildFill="False">
<DockPanel IsVisible="{OnPlatform False, Windows=True}" LastChildFill="False">
<ToolTip.Tip>
<TextBlock>
<Run Text="Perform automatic updates on every launch." />
Expand All @@ -54,10 +49,7 @@
</DockPanel>

<!-- Dark mode -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="Use darker colors in the UI">
<DockPanel LastChildFill="False" ToolTip.Tip="Use darker colors in the UI">
<TextBlock
Margin="16,8"
VerticalAlignment="Center"
Expand All @@ -73,10 +65,7 @@
</DockPanel>

<!-- Persist authentication -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="Save authentication cookies to a file so that they can be persisted between sessions">
<DockPanel LastChildFill="False" ToolTip.Tip="Save authentication cookies to a file so that they can be persisted between sessions">
<TextBlock
Margin="16,8"
VerticalAlignment="Center"
Expand All @@ -90,10 +79,7 @@
</DockPanel>

<!-- Inject subtitles -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="Inject subtitles into downloaded files">
<DockPanel LastChildFill="False" ToolTip.Tip="Inject subtitles into downloaded files">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Expand All @@ -105,10 +91,7 @@
</DockPanel>

<!-- Inject tags -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="Inject media tags into downloaded files">
<DockPanel LastChildFill="False" ToolTip.Tip="Inject media tags into downloaded files">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Expand All @@ -120,10 +103,7 @@
</DockPanel>

<!-- Skip existing files -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="When downloading multiple videos, skip those that already have matching files in the output directory">
<DockPanel LastChildFill="False" ToolTip.Tip="When downloading multiple videos, skip those that already have matching files in the output directory">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Expand All @@ -135,10 +115,7 @@
</DockPanel>

<!-- File name template -->
<DockPanel
Margin="16,8"
Background="Transparent"
LastChildFill="False">
<DockPanel Margin="16,8" LastChildFill="False">
<ToolTip.Tip>
<TextBlock>
<Run Text="Template used for generating file names for downloaded videos." />
Expand Down Expand Up @@ -179,7 +156,6 @@
<!-- Parallel limit -->
<DockPanel
Margin="16,8"
Background="Transparent"
LastChildFill="False"
ToolTip.Tip="How many downloads can be active at the same time">
<TextBlock
Expand All @@ -200,7 +176,6 @@
VerticalAlignment="Center"
Maximum="10"
Minimum="1"
Theme="{DynamicResource MaterialDesignThinSlider}"
Value="{Binding ParallelLimit}" />
</StackPanel>
</DockPanel>
Expand Down

0 comments on commit 499235a

Please sign in to comment.