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.

3.3 KB
Raw Blame
<!--
  Borderless, transparent, always-on-top window that hosts the live donut toolbar at the cursor.
  It is created once and reused (shown/hidden) so it appears instantly.
  ShowActivated=False: during a file drag it must not steal focus from Explorer, or the drag would break.
-->
<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="using:Filee.App.Controls"
        xmlns:vm="using:Filee.App.ViewModels"
        x:Class="Filee.App.Views.RadialWindow"
        x:DataType="vm:RadialViewModel"
        Title="Filee Donut"
        WindowDecorations="None"
        Background="Transparent"
        TransparencyLevelHint="Transparent"
        Topmost="True"
        ShowInTaskbar="False"
        ShowActivated="False"
        CanResize="False"
        SizeToContent="WidthAndHeight">
  <Window.Styles>
    <!-- The download badge pops up above the progress ring and pops away once the files are saved. -->
    <Style Selector="Border.download-badge">
      <Setter Property="Opacity" Value="0" />
      <Setter Property="RenderTransform" Value="scale(0.6)" />
      <Setter Property="Transitions">
        <Transitions>
          <DoubleTransition Property="Opacity" Duration="0:0:0.16" />
          <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.22" Easing="BackEaseOut" />
        </Transitions>
      </Setter>
    </Style>
    <Style Selector="Border.download-badge.shown">
      <Setter Property="Opacity" Value="1" />
      <Setter Property="RenderTransform" Value="scale(1)" />
    </Style>
    <Style Selector="Window.reduced-motion Border.download-badge">
      <Setter Property="Transitions" Value="{x:Null}" />
    </Style>
  </Window.Styles>
  <Panel x:Name="Root" Background="{Binding HitBackground}" DragDrop.AllowDrop="True">
    <c:DonutMenu x:Name="Donut"
                 Opacity="{Binding DonutOpacity}"
                 Items="{Binding Items}"
                 CenterTitle="{Binding CenterTitle}"
                 CenterSubtitle="{Binding CenterSubtitle}"
                 OuterRadius="{Binding OuterRadius}"
                 HoleRatio="{Binding HoleRatio}"
                 SliceOpacity="{Binding SliceOpacity}"
                 ReserveSubRing="{Binding ReserveSubRing}"
                 CanFlip="{Binding CanFlip}"
                 CenterHint="{Binding FlipHint}"
                 CenterHintWheel="{Binding FlipHintWheel}"
                 FlipKey="{Binding FlipKey}"
                 FlipWithWheel="{Binding FlipWithWheel}" />
    <!-- Centred on the donut and lifted just above the ring (DonutMenu.RingRadius 36, its stroke and plate). -->
    <Panel HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False"
           RenderTransform="translate(0px, -70px)">
      <Border x:Name="DownloadBadge" Classes="download-badge" Classes.shown="{Binding ProgressJob.IsDownloading, FallbackValue=False}"
              Background="{DynamicResource SurfaceBrush}" BorderBrush="{DynamicResource AccentBrush}" BorderThickness="1"
              CornerRadius="{DynamicResource SoftRadius}" Padding="10,4" RenderTransformOrigin="50%,100%">
        <TextBlock Text="{Binding ProgressJob.DownloadText, FallbackValue=''}" FontSize="12" FontWeight="SemiBold" />
      </Border>
    </Panel>
  </Panel>
</Window>