浏览代码

fix dark theme in control catalog

Dan Walmsley 5 年之前
父节点
当前提交
ecbf92cf29

+ 2 - 1
samples/ControlCatalog/MainWindow.xaml

@@ -11,6 +11,7 @@
         ExtendClientAreaChromeHints="{Binding ChromeHints}"
         ExtendClientAreaTitleBarHeightHint="{Binding TitleBarHeight}"
         TransparencyLevelHint="{Binding TransparencyLevel}"
+        TransparencyBackgroundFallback="Transparent"
         x:Name="MainWindow"
         x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}" Background="{x:Null}">
   <NativeMenu.Menu>
@@ -68,7 +69,7 @@
   </Window.DataTemplates>
   <Panel>
     <Panel Margin="{Binding #MainWindow.OffScreenMargin}">
-      <DockPanel LastChildFill="True" Margin="{Binding #MainWindow.WindowDecorationMargins}">
+      <DockPanel Background="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}" LastChildFill="True" Margin="{Binding #MainWindow.WindowDecorationMargins}">
         <Menu Name="MainMenu" DockPanel.Dock="Top">
           <MenuItem Header="File">
             <MenuItem Header="Exit" Command="{Binding ExitCommand}" />

+ 1 - 2
src/Avalonia.Themes.Fluent/CaptionButtons.xaml

@@ -1,6 +1,5 @@
 <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-  <Style Selector="CaptionButtons">
-    <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>    
+  <Style Selector="CaptionButtons">    
     <Setter Property="MaxHeight" Value="30" />
     <Setter Property="Template">
       <ControlTemplate>

+ 1 - 2
src/Avalonia.Themes.Fluent/Window.xaml

@@ -1,6 +1,5 @@
 <Style xmlns="https://github.com/avaloniaui" Selector="Window">
-  <Setter Property="Background" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}"/>
-  <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}"/>
+  <Setter Property="Background" Value="{DynamicResource SystemControlBackgroundChromeBlackHighBrush}"/>  
   <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
   <Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}"/>
   <Setter Property="Template">