UI improvements
This commit is contained in:
parent
34ad00ce03
commit
ac4061f1ca
@ -4,30 +4,113 @@
|
||||
RequestedThemeVariant="Light"
|
||||
x:Class="OF_DL.Gui.App">
|
||||
<Application.Resources>
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#EEF3FB" />
|
||||
<SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="SurfaceBorderBrush" Color="#DDE5F3" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundBrush" Color="#2E6EEA" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonForegroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonForegroundBrush" Color="#1F2A44" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBorderBrush" Color="#CFD9EB" />
|
||||
<SolidColorBrush x:Key="TopBarBackgroundBrush" Color="#DDEAFF" />
|
||||
<SolidColorBrush x:Key="TopBarBorderBrush" Color="#CFD9EB" />
|
||||
<SolidColorBrush x:Key="TopBarTextBrush" Color="#304261" />
|
||||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#1F2A44" />
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#4A5B78" />
|
||||
<SolidColorBrush x:Key="HelpBadgeBackgroundBrush" Color="#EAF0FB" />
|
||||
<SolidColorBrush x:Key="HelpBadgeBorderBrush" Color="#C5D4EC" />
|
||||
<SolidColorBrush x:Key="ErrorTextBrush" Color="#FF5A5A" />
|
||||
<SolidColorBrush x:Key="PreviewBackgroundBrush" Color="#F5F8FE" />
|
||||
<SolidColorBrush x:Key="PreviewBorderBrush" Color="#D8E3F4" />
|
||||
<SolidColorBrush x:Key="DangerSoftBackgroundBrush" Color="#FFE8E8" />
|
||||
<SolidColorBrush x:Key="DangerSoftBorderBrush" Color="#E8C5C5" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundBrush" Color="#D84E4E" />
|
||||
<SolidColorBrush x:Key="OverlayBackgroundBrush" Color="#80000000" />
|
||||
<SolidColorBrush x:Key="ModalBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="ModalBorderBrush" Color="#DDE5F3" />
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<!-- Light Theme -->
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#F8FAFC" />
|
||||
<SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="SurfaceBorderBrush" Color="#E2E8F0" />
|
||||
|
||||
<!-- Primary Button -->
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundBrush" Color="#3B82F6" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundHoverBrush" Color="#2563EB" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundPressedBrush" Color="#1D4ED8" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonForegroundBrush" Color="#FFFFFF" />
|
||||
|
||||
<!-- Secondary Button -->
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundHoverBrush" Color="#F1F5F9" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundPressedBrush" Color="#E2E8F0" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonForegroundBrush" Color="#1E293B" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBorderBrush" Color="#CBD5E1" />
|
||||
|
||||
<!-- Top Bar -->
|
||||
<SolidColorBrush x:Key="TopBarBackgroundBrush" Color="#EFF6FF" />
|
||||
<SolidColorBrush x:Key="TopBarBorderBrush" Color="#DBEAFE" />
|
||||
<SolidColorBrush x:Key="TopBarTextBrush" Color="#1E40AF" />
|
||||
|
||||
<!-- Text Colors -->
|
||||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#0F172A" />
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#475569" />
|
||||
|
||||
<!-- Help Badge -->
|
||||
<SolidColorBrush x:Key="HelpBadgeBackgroundBrush" Color="#EFF6FF" />
|
||||
<SolidColorBrush x:Key="HelpBadgeBorderBrush" Color="#BFDBFE" />
|
||||
|
||||
<!-- Error -->
|
||||
<SolidColorBrush x:Key="ErrorTextBrush" Color="#EF4444" />
|
||||
|
||||
<!-- Preview/Item Background -->
|
||||
<SolidColorBrush x:Key="PreviewBackgroundBrush" Color="#F8FAFC" />
|
||||
<SolidColorBrush x:Key="PreviewBorderBrush" Color="#E2E8F0" />
|
||||
|
||||
<!-- Danger Button -->
|
||||
<SolidColorBrush x:Key="DangerSoftBackgroundBrush" Color="#FEE2E2" />
|
||||
<SolidColorBrush x:Key="DangerSoftBorderBrush" Color="#FECACA" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundBrush" Color="#EF4444" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundHoverBrush" Color="#DC2626" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundPressedBrush" Color="#B91C1C" />
|
||||
|
||||
<!-- Modal -->
|
||||
<SolidColorBrush x:Key="OverlayBackgroundBrush" Color="#99000000" />
|
||||
<SolidColorBrush x:Key="ModalBackgroundBrush" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="ModalBorderBrush" Color="#E2E8F0" />
|
||||
</ResourceDictionary>
|
||||
|
||||
<!-- Dark Theme -->
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#0F172A" />
|
||||
<SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="#1E293B" />
|
||||
<SolidColorBrush x:Key="SurfaceBorderBrush" Color="#334155" />
|
||||
|
||||
<!-- Primary Button -->
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundBrush" Color="#3B82F6" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundHoverBrush" Color="#2563EB" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonBackgroundPressedBrush" Color="#1D4ED8" />
|
||||
<SolidColorBrush x:Key="PrimaryButtonForegroundBrush" Color="#FFFFFF" />
|
||||
|
||||
<!-- Secondary Button - Fixed for dark theme -->
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundBrush" Color="#334155" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundHoverBrush" Color="#475569" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBackgroundPressedBrush" Color="#1E293B" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonForegroundBrush" Color="#F1F5F9" />
|
||||
<SolidColorBrush x:Key="SecondaryButtonBorderBrush" Color="#475569" />
|
||||
|
||||
<!-- Top Bar -->
|
||||
<SolidColorBrush x:Key="TopBarBackgroundBrush" Color="#1E293B" />
|
||||
<SolidColorBrush x:Key="TopBarBorderBrush" Color="#334155" />
|
||||
<SolidColorBrush x:Key="TopBarTextBrush" Color="#93C5FD" />
|
||||
|
||||
<!-- Text Colors -->
|
||||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#F1F5F9" />
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#94A3B8" />
|
||||
|
||||
<!-- Help Badge -->
|
||||
<SolidColorBrush x:Key="HelpBadgeBackgroundBrush" Color="#1E3A8A" />
|
||||
<SolidColorBrush x:Key="HelpBadgeBorderBrush" Color="#3B82F6" />
|
||||
|
||||
<!-- Error -->
|
||||
<SolidColorBrush x:Key="ErrorTextBrush" Color="#F87171" />
|
||||
|
||||
<!-- Preview/Item Background -->
|
||||
<SolidColorBrush x:Key="PreviewBackgroundBrush" Color="#0F172A" />
|
||||
<SolidColorBrush x:Key="PreviewBorderBrush" Color="#334155" />
|
||||
|
||||
<!-- Danger Button -->
|
||||
<SolidColorBrush x:Key="DangerSoftBackgroundBrush" Color="#7F1D1D" />
|
||||
<SolidColorBrush x:Key="DangerSoftBorderBrush" Color="#991B1B" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundBrush" Color="#EF4444" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundHoverBrush" Color="#DC2626" />
|
||||
<SolidColorBrush x:Key="DangerButtonBackgroundPressedBrush" Color="#B91C1C" />
|
||||
|
||||
<!-- Modal -->
|
||||
<SolidColorBrush x:Key="OverlayBackgroundBrush" Color="#CC000000" />
|
||||
<SolidColorBrush x:Key="ModalBackgroundBrush" Color="#1E293B" />
|
||||
<SolidColorBrush x:Key="ModalBorderBrush" Color="#334155" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
<Application.Styles>
|
||||
<fluent:FluentTheme />
|
||||
|
||||
@ -33,20 +33,23 @@ public sealed class ConfigCategoryViewModel : ViewModelBase
|
||||
FolderPerMessageField = fieldList.FirstOrDefault(field =>
|
||||
string.Equals(field.PropertyName, nameof(Config.FolderPerMessage), StringComparison.Ordinal));
|
||||
|
||||
IEnumerable<ConfigFieldViewModel> visibleFields = IsDownloadBehavior
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.DownloadOnlySpecificDates)
|
||||
and not nameof(Config.DownloadDateSelection)
|
||||
and not nameof(Config.CustomDate)
|
||||
and not nameof(Config.DownloadVideoResolution))
|
||||
: IsPerformance
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.LimitDownloadRate)
|
||||
and not nameof(Config.DownloadLimitInMbPerSec))
|
||||
: IsFolderStructure
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.FolderPerPaidPost)
|
||||
and not nameof(Config.FolderPerPost)
|
||||
and not nameof(Config.FolderPerPaidMessage)
|
||||
and not nameof(Config.FolderPerMessage))
|
||||
: fieldList;
|
||||
IEnumerable<ConfigFieldViewModel> visibleFields = IsExternal
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.FFmpegPath)
|
||||
and not nameof(Config.FFprobePath))
|
||||
: IsDownloadBehavior
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.DownloadOnlySpecificDates)
|
||||
and not nameof(Config.DownloadDateSelection)
|
||||
and not nameof(Config.CustomDate)
|
||||
and not nameof(Config.DownloadVideoResolution))
|
||||
: IsPerformance
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.LimitDownloadRate)
|
||||
and not nameof(Config.DownloadLimitInMbPerSec))
|
||||
: IsFolderStructure
|
||||
? fieldList.Where(field => field.PropertyName is not nameof(Config.FolderPerPaidPost)
|
||||
and not nameof(Config.FolderPerPost)
|
||||
and not nameof(Config.FolderPerPaidMessage)
|
||||
and not nameof(Config.FolderPerMessage))
|
||||
: fieldList;
|
||||
|
||||
foreach (ConfigFieldViewModel field in visibleFields)
|
||||
{
|
||||
@ -56,6 +59,9 @@ public sealed class ConfigCategoryViewModel : ViewModelBase
|
||||
|
||||
public string CategoryName { get; }
|
||||
|
||||
public bool IsExternal =>
|
||||
string.Equals(CategoryName, "External", StringComparison.Ordinal);
|
||||
|
||||
public bool IsDownloadBehavior =>
|
||||
string.Equals(CategoryName, "Download Behavior", StringComparison.Ordinal);
|
||||
|
||||
|
||||
@ -485,7 +485,7 @@ public partial class MainWindowViewModel(
|
||||
RefreshIgnoredUsersListsCommand.NotifyCanExecuteChanged();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
[RelayCommand(CanExecute = nameof(CanEditConfig))]
|
||||
private void EditConfig()
|
||||
{
|
||||
if (CurrentScreen == AppScreen.Config)
|
||||
@ -824,6 +824,8 @@ public partial class MainWindowViewModel(
|
||||
|
||||
private bool CanLogout() => IsAuthenticated && !IsDownloading;
|
||||
|
||||
private bool CanEditConfig() => CurrentScreen != AppScreen.Config;
|
||||
|
||||
partial void OnCurrentScreenChanged(AppScreen value)
|
||||
{
|
||||
OnPropertyChanged(nameof(IsLoadingScreen));
|
||||
@ -839,6 +841,7 @@ public partial class MainWindowViewModel(
|
||||
RefreshUsersCommand.NotifyCanExecuteChanged();
|
||||
RefreshIgnoredUsersListsCommand.NotifyCanExecuteChanged();
|
||||
LogoutCommand.NotifyCanExecuteChanged();
|
||||
EditConfigCommand.NotifyCanExecuteChanged();
|
||||
}
|
||||
|
||||
partial void OnIsDownloadingChanged(bool value)
|
||||
@ -1649,8 +1652,6 @@ public partial class MainWindowViewModel(
|
||||
or nameof(Config.NonInteractiveModeListName)
|
||||
or nameof(Config.NonInteractiveModePurchasedTab)
|
||||
or nameof(Config.DisableBrowserAuth)
|
||||
or nameof(Config.FFmpegPath)
|
||||
or nameof(Config.FFprobePath)
|
||||
or nameof(Config.DownloadPath)
|
||||
or nameof(Config.DrmVideoDurationMatchThreshold)
|
||||
or nameof(Config.DownloadVideos)
|
||||
@ -1672,6 +1673,7 @@ public partial class MainWindowViewModel(
|
||||
{
|
||||
nameof(Config.DisableBrowserAuth) => "Auth",
|
||||
nameof(Config.FFmpegPath) => "External",
|
||||
nameof(Config.FFprobePath) => "External",
|
||||
|
||||
nameof(Config.DownloadAvatarHeaderPhoto) => "Download Media Types",
|
||||
nameof(Config.DownloadPaidPosts) => "Download Media Types",
|
||||
@ -1743,7 +1745,7 @@ public partial class MainWindowViewModel(
|
||||
};
|
||||
|
||||
private static bool IsLeftColumnCategory(string categoryName) =>
|
||||
categoryName is "Appearance" or "Logging" or "Download Behavior" or "Subscriptions";
|
||||
categoryName is "Appearance" or "Logging" or "External" or "Download Behavior" or "Subscriptions";
|
||||
|
||||
private static bool IsRightColumnCategory(string categoryName) =>
|
||||
categoryName is "File Naming" or "Folder Structure" or "Performance";
|
||||
@ -1753,8 +1755,9 @@ public partial class MainWindowViewModel(
|
||||
{
|
||||
"Appearance" => 1,
|
||||
"Logging" => 2,
|
||||
"Download Behavior" => 3,
|
||||
"Subscriptions" => 4,
|
||||
"External" => 3,
|
||||
"Download Behavior" => 4,
|
||||
"Subscriptions" => 5,
|
||||
_ => 100
|
||||
};
|
||||
|
||||
|
||||
@ -5,99 +5,144 @@
|
||||
xmlns:views="using:OF_DL.Gui.Views"
|
||||
x:Class="OF_DL.Gui.Views.AboutWindow"
|
||||
x:DataType="views:AboutWindow"
|
||||
Width="760"
|
||||
Width="600"
|
||||
Height="520"
|
||||
MinWidth="620"
|
||||
MinHeight="440"
|
||||
MinWidth="550"
|
||||
MinHeight="420"
|
||||
Title="About OF DL"
|
||||
Background="{DynamicResource WindowBackgroundBrush}"
|
||||
mc:Ignorable="d">
|
||||
<Border Margin="14"
|
||||
Padding="16"
|
||||
Background="{DynamicResource SurfaceBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12">
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<TextBlock Grid.Row="0"
|
||||
FontSize="24"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="About OF DL" />
|
||||
<Window.Styles>
|
||||
<Style Selector="Button.link">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonBackgroundBrush}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
</Style>
|
||||
<Style Selector="Button.link:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonBackgroundHoverBrush}" />
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,14,0,0"
|
||||
ColumnDefinitions="Auto,*"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="Version:" />
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding ProgramVersion}" />
|
||||
<Grid Margin="24"
|
||||
RowDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0"
|
||||
FontSize="28"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="About OF DL"
|
||||
Margin="0,0,0,20" />
|
||||
|
||||
<TextBlock Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="Source Code:" />
|
||||
<Button Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding SourceCodeUrl}"
|
||||
Click="OnOpenSourceCodeClick" />
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<StackPanel Spacing="16">
|
||||
<!-- Application Info Section -->
|
||||
<Border Background="{DynamicResource SurfaceBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Padding="24"
|
||||
BoxShadow="0 1 3 0 #0F000000, 0 1 2 -1 #0F000000">
|
||||
<StackPanel Spacing="12">
|
||||
<TextBlock FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="Application" />
|
||||
|
||||
<TextBlock Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFmpeg Version:" />
|
||||
<TextBlock Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding FfmpegVersion}" />
|
||||
<Grid ColumnDefinitions="140,*" RowDefinitions="Auto,Auto">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="Version" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding ProgramVersion}" />
|
||||
|
||||
<TextBlock Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFprobe Version:" />
|
||||
<TextBlock Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding FfprobeVersion}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Margin="0,10,0,0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="Source Code" />
|
||||
<Button Grid.Row="1" Grid.Column="1"
|
||||
Margin="0,10,0,0"
|
||||
Classes="link"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding SourceCodeUrl}"
|
||||
Click="OnOpenSourceCodeClick" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFmpeg License:" />
|
||||
<Button Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding FfmpegLicenseUrl}"
|
||||
Click="OnOpenFfmpegLicenseClick" />
|
||||
<!-- FFmpeg Info Section -->
|
||||
<Border Background="{DynamicResource SurfaceBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Padding="24"
|
||||
BoxShadow="0 1 3 0 #0F000000, 0 1 2 -1 #0F000000">
|
||||
<StackPanel Spacing="12">
|
||||
<TextBlock FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="External Tools" />
|
||||
|
||||
<TextBlock Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFprobe License:" />
|
||||
<Button Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding FfprobeLicenseUrl}"
|
||||
Click="OnOpenFfprobeLicenseClick" />
|
||||
</Grid>
|
||||
<StackPanel Spacing="12">
|
||||
<!-- FFmpeg -->
|
||||
<TextBlock Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFmpeg" />
|
||||
<Grid ColumnDefinitions="120,*" RowDefinitions="Auto,Auto" Margin="20,0,0,0">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="Version" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding FfmpegVersion}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<Button Grid.Row="2"
|
||||
Margin="0,18,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Content="Close"
|
||||
Click="OnCloseClick" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Margin="0,8,0,0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="License" />
|
||||
<Button Grid.Row="1" Grid.Column="1"
|
||||
Margin="0,8,0,0"
|
||||
Classes="link"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding FfmpegLicenseUrl}"
|
||||
Click="OnOpenFfmpegLicenseClick" />
|
||||
</Grid>
|
||||
|
||||
<!-- FFprobe -->
|
||||
<TextBlock Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="FFprobe"
|
||||
Margin="0,4,0,0" />
|
||||
<Grid ColumnDefinitions="120,*" RowDefinitions="Auto,Auto" Margin="20,0,0,0">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="Version" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding FfprobeVersion}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Margin="0,8,0,0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="License" />
|
||||
<Button Grid.Row="1" Grid.Column="1"
|
||||
Margin="0,8,0,0"
|
||||
Classes="link"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{Binding FfprobeLicenseUrl}"
|
||||
Click="OnOpenFfprobeLicenseClick" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
xmlns:views="using:OF_DL.Gui.Views"
|
||||
x:Class="OF_DL.Gui.Views.FaqWindow"
|
||||
x:DataType="views:FaqWindow"
|
||||
Width="760"
|
||||
Height="640"
|
||||
MinWidth="600"
|
||||
MinHeight="500"
|
||||
Width="800"
|
||||
Height="680"
|
||||
MinWidth="650"
|
||||
MinHeight="550"
|
||||
Title="FAQ"
|
||||
Background="{DynamicResource WindowBackgroundBrush}"
|
||||
mc:Ignorable="d">
|
||||
@ -17,91 +17,124 @@
|
||||
<Setter Property="Background" Value="{DynamicResource SurfaceBackgroundBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SurfaceBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="10" />
|
||||
<Setter Property="Padding" Value="14" />
|
||||
<Setter Property="Margin" Value="0,0,0,10" />
|
||||
<Setter Property="CornerRadius" Value="12" />
|
||||
<Setter Property="Padding" Value="20" />
|
||||
<Setter Property="Margin" Value="0,0,0,16" />
|
||||
<Setter Property="BoxShadow" Value="0 1 3 0 #0F000000, 0 1 2 -1 #0F000000" />
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<BoxShadowsTransition Property="BoxShadow" Duration="0:0:0.2" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.faqCard:pointerover">
|
||||
<Setter Property="BoxShadow" Value="0 4 6 -1 #19000000, 0 2 4 -1 #0F000000" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock.question">
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock.answer">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
<Setter Property="LineHeight" Value="22" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.link">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonBackgroundBrush}" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.link:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonBackgroundHoverBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.codeBlock">
|
||||
<Setter Property="Background" Value="{DynamicResource PreviewBackgroundBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PreviewBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
<Setter Property="Padding" Value="12" />
|
||||
<Setter Property="Margin" Value="0,8,0,0" />
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
<Border Margin="14"
|
||||
Padding="16"
|
||||
Background="{DynamicResource SurfaceBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12">
|
||||
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
||||
<TextBlock Grid.Row="0"
|
||||
FontSize="24"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="Frequently Asked Questions" />
|
||||
<Grid Margin="24"
|
||||
RowDefinitions="Auto,*">
|
||||
<!-- Header -->
|
||||
<TextBlock Grid.Row="0"
|
||||
FontSize="32"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="Frequently Asked Questions"
|
||||
Margin="0,0,0,20" />
|
||||
|
||||
<ScrollViewer Grid.Row="2"
|
||||
Margin="0,14,0,0">
|
||||
<ItemsControl ItemsSource="{Binding Entries}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="views:FaqEntry">
|
||||
<Border Classes="faqCard">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock FontSize="18"
|
||||
FontWeight="SemiBold"
|
||||
<!-- FAQ Items -->
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<ItemsControl ItemsSource="{Binding Entries}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="views:FaqEntry">
|
||||
<Border Classes="faqCard">
|
||||
<StackPanel Spacing="12">
|
||||
<!-- Question -->
|
||||
<TextBlock Classes="question"
|
||||
Text="{Binding Question}" />
|
||||
|
||||
<!-- Answer Paragraphs -->
|
||||
<ItemsControl ItemsSource="{Binding Paragraphs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="x:String">
|
||||
<TextBlock Classes="answer"
|
||||
Text="{Binding .}"
|
||||
Margin="0,0,0,8" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Links -->
|
||||
<ItemsControl IsVisible="{Binding HasLinks}"
|
||||
ItemsSource="{Binding Links}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="8" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="views:FaqLink">
|
||||
<Button Classes="link"
|
||||
Content="{Binding Label}"
|
||||
ToolTip.Tip="{Binding Url}"
|
||||
CommandParameter="{Binding Url}"
|
||||
Click="OnLinkClick" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Code Snippet -->
|
||||
<Border IsVisible="{Binding HasCodeSnippet}"
|
||||
Classes="codeBlock">
|
||||
<TextBlock Text="{Binding CodeSnippet}"
|
||||
FontFamily="Consolas,Courier New,monospace"
|
||||
FontSize="13"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Text="{Binding Question}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<ItemsControl ItemsSource="{Binding Paragraphs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="x:String">
|
||||
<TextBlock Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Text="{Binding .}"
|
||||
TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<ItemsControl IsVisible="{Binding HasLinks}"
|
||||
ItemsSource="{Binding Links}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="views:FaqLink">
|
||||
<Button HorizontalAlignment="Left"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="0"
|
||||
Foreground="{DynamicResource PrimaryButtonBackgroundBrush}"
|
||||
FontWeight="SemiBold"
|
||||
Content="{Binding Label}"
|
||||
ToolTip.Tip="{Binding Url}"
|
||||
CommandParameter="{Binding Url}"
|
||||
Click="OnLinkClick" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<Border IsVisible="{Binding HasCodeSnippet}"
|
||||
Margin="0,2,0,0"
|
||||
Padding="10"
|
||||
CornerRadius="8"
|
||||
Background="{DynamicResource PreviewBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource PreviewBorderBrush}"
|
||||
BorderThickness="1">
|
||||
<TextBlock Text="{Binding CodeSnippet}"
|
||||
FontFamily="Consolas"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
<Button Grid.Row="3"
|
||||
Margin="0,18,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Content="Close"
|
||||
Click="OnCloseClick" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -140,7 +140,10 @@ public partial class MainWindow : Window
|
||||
|
||||
private void OnFaqClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
FaqWindow faqWindow = new();
|
||||
FaqWindow faqWindow = new()
|
||||
{
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
faqWindow.Show(this);
|
||||
}
|
||||
|
||||
@ -151,7 +154,10 @@ public partial class MainWindow : Window
|
||||
return;
|
||||
}
|
||||
|
||||
AboutWindow aboutWindow = new(vm.ProgramVersion, vm.FfmpegVersion, vm.FfprobeVersion);
|
||||
AboutWindow aboutWindow = new(vm.ProgramVersion, vm.FfmpegVersion, vm.FfprobeVersion)
|
||||
{
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
aboutWindow.Show(this);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user