Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

4.0 KB
Raw Blame
<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="using:Filee.App"
             x:Class="Filee.App.App"
             Name="Filee"
             RequestedThemeVariant="Default">

  <Application.DataTemplates>
    <!-- Maps FooPageViewModel → FooPage view (see ViewLocator.cs). -->
    <local:ViewLocator />
  </Application.DataTemplates>

  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceInclude Source="avares://Filee/Styles/Icons.axaml" />
        <ResourceInclude Source="avares://Filee/Styles/Brands.axaml" />
      </ResourceDictionary.MergedDictionaries>
      <!-- The Theme page's colour picker shows only the spectrum: no empty tab strip above it. Set here because its
           flyout looks resources up outside the page. -->
      <x:Double x:Key="ColorViewTabStripHeight">0</x:Double>
      <!-- The picker's own panels draw their background and borders from these: clear, so the card (the
           FlyoutPresenter.nopadding style below) is the only surface and no stray lines show. -->
      <SolidColorBrush x:Key="ColorViewContentBackgroundBrush" Color="Transparent" />
      <SolidColorBrush x:Key="ColorViewContentBorderBrush" Color="Transparent" />
      <SolidColorBrush x:Key="ColorViewTabBorderBrush" Color="Transparent" />
    </ResourceDictionary>
  </Application.Resources>

  <Application.Styles>
    <FluentTheme />
    <StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml" />
    <!-- ColorSpectrum handles arrow keys but does not enable keyboard focus by default. -->
    <Style Selector="ColorSpectrum">
      <Setter Property="Focusable" Value="True" />
    </Style>
    <!-- The colour picker's flyout (class nopadding) draws a fixed 48 px tab strip background: gone with the strip. -->
    <Style Selector="FlyoutPresenter.nopadding Border#TabBackgroundBorder">
      <Setter Property="IsVisible" Value="False" />
    </Style>
    <Style Selector="FlyoutPresenter.nopadding Border#ContentBackgroundBorder">
      <Setter Property="Margin" Value="0" />
    </Style>
    <!-- The tab strip is hidden, but its selected tab still drew an accent line along the top of the card. -->
    <Style Selector="FlyoutPresenter.nopadding TabItem /template/ Border#PART_SelectedPipe">
      <Setter Property="IsVisible" Value="False" />
    </Style>
    <Style Selector="FlyoutPresenter.nopadding TabItem:selected /template/ Border#PART_SelectedPipe">
      <Setter Property="IsVisible" Value="False" />
    </Style>
    <!-- The picker's card: the page's surface with the theme's soft corners and a faint outline. -->
    <Style Selector="FlyoutPresenter.nopadding">
      <Setter Property="Background" Value="{DynamicResource SurfaceBrush}" />
      <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
    </Style>
    <!-- The spectrum square follows the theme's softness too. -->
    <Style Selector="FlyoutPresenter.nopadding ColorSpectrum">
      <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusSmall}" />
    </Style>
    <!-- The swatch button on the pages: soft corners, a quiet outline, and a card colour around the swatch so a white
         one still shows. -->
    <Style Selector="ColorPicker">
      <Setter Property="CornerRadius" Value="{DynamicResource SoftRadiusSmall}" />
    </Style>
    <Style Selector="ColorPicker /template/ DropDownButton">
      <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
      <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
      <Setter Property="BorderThickness" Value="1.5" />
    </Style>
    <StyleInclude Source="avares://Filee/Styles/Soft.axaml" />
    <StyleInclude Source="avares://Filee/Styles/Controls.axaml" />
    <StyleInclude Source="avares://Filee/Styles/TagEditor.axaml" />
  </Application.Styles>
</Application>