OverviewFilesCommitsIssuesDocsReleasesPeers

ifsrenderer-linux / AvaloniaShell / App.axaml

31 lines · axaml ref:
<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles"
             x:Class="IFSRenderer.AvaloniaShell.App"
             RequestedThemeVariant="Dark">
  <!--
    Mirrors WpfDisplay/App.xaml, which loads:
        <md:BundledTheme BaseTheme="Dark" PrimaryColor="Grey" SecondaryColor="LightBlue" />
    Material.Avalonia is the Avalonia port of the same Material Design language, so the
    same three values reproduce the Windows palette rather than approximating it:
    paper #323232, cards #454545, primary Grey 500 (#9e9e9e) with black foreground.
  -->
  <Application.Styles>
    <themes:MaterialTheme BaseTheme="Dark" PrimaryColor="Grey" SecondaryColor="LightBlue" />
  </Application.Styles>

  <!--
    Material.Avalonia's dark surfaces measure #303030 (paper) and #424242 (card); the values
    sampled off the Windows screenshots are #323232 and #454545. Two to three units apart is
    invisible on its own but obvious at a seam, and the port had seams everywhere: it painted its
    own panels with the sampled values while every theme-owned surface — FlyoutPresenter,
    Expander, MenuFlyoutPresenter — kept Material's. Overriding the theme keys instead of
    hardcoding around them makes both agree, and on the measured Windows colour rather than
    Material's.
  -->
  <Application.Resources>
    <SolidColorBrush x:Key="MaterialDesignPaper" Color="#323232" />
    <SolidColorBrush x:Key="MaterialDesignCardBackground" Color="#454545" />
  </Application.Resources>
</Application>