Browse Source

remove usages of old ThemeAccentBrush.

pull/4233/head
Dan Walmsley 6 years ago
parent
commit
c3c82230d2
  1. 10
      samples/ControlCatalog/App.xaml.cs
  2. 10
      samples/ControlCatalog/Pages/BorderPage.xaml
  3. 10
      samples/ControlCatalog/Pages/ButtonPage.xaml
  4. 2
      samples/ControlCatalog/Pages/ComboBoxPage.xaml
  5. 4
      samples/ControlCatalog/Pages/ContextMenuPage.xaml
  6. 6
      samples/ControlCatalog/Pages/DragAndDropPage.xaml
  7. 8
      samples/ControlCatalog/Pages/LayoutTransformControlPage.xaml
  8. 4
      samples/ControlCatalog/Pages/ToolTipPage.xaml
  9. 4
      samples/ControlCatalog/SideBar.xaml
  10. 4
      samples/RenderDemo/Pages/ClippingPage.xaml
  11. 4
      samples/RenderDemo/SideBar.xaml
  12. 2
      src/Avalonia.Controls.DataGrid/Themes/Default.xaml
  13. 4
      src/Avalonia.Themes.Fluent/CalendarDatePicker.xaml
  14. 2
      src/Avalonia.Themes.Fluent/ContextMenu.xaml
  15. 2
      src/Avalonia.Themes.Fluent/TextBox.xaml

10
samples/ControlCatalog/App.xaml.cs

@ -11,10 +11,6 @@ namespace ControlCatalog
{ {
public static Styles FluentDark = new Styles public static Styles FluentDark = new Styles
{ {
new StyleInclude(new Uri("avares://ControlCatalog/Styles"))
{
Source = new Uri("avares://Avalonia.Themes.Default/Accents/BaseDark.xaml")
},
new StyleInclude(new Uri("avares://ControlCatalog/Styles")) new StyleInclude(new Uri("avares://ControlCatalog/Styles"))
{ {
Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/FluentDark.xaml") Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/FluentDark.xaml")
@ -23,10 +19,6 @@ namespace ControlCatalog
public static Styles FluentLight = new Styles public static Styles FluentLight = new Styles
{ {
new StyleInclude(new Uri("avares://ControlCatalog/Styles"))
{
Source = new Uri("avares://Avalonia.Themes.Default/Accents/BaseLight.xaml")
},
new StyleInclude(new Uri("avares://ControlCatalog/Styles")) new StyleInclude(new Uri("avares://ControlCatalog/Styles"))
{ {
Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/FluentLight.xaml") Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/FluentLight.xaml")
@ -61,7 +53,7 @@ namespace ControlCatalog
{ {
AvaloniaXamlLoader.Load(this); AvaloniaXamlLoader.Load(this);
Styles.Insert(0, FluentLight); Styles.Insert(0, FluentDark);
} }
public override void OnFrameworkInitializationCompleted() public override void OnFrameworkInitializationCompleted()

10
samples/ControlCatalog/Pages/BorderPage.xaml

@ -12,24 +12,24 @@
<Border BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="2" Padding="16"> <Border BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="2" Padding="16">
<TextBlock>Border</TextBlock> <TextBlock>Border</TextBlock>
</Border> </Border>
<Border Background="{DynamicResource ThemeAccentBrush2}" <Border Background="{DynamicResource SystemAccentColorDark1}"
BorderBrush="{DynamicResource ThemeAccentBrush}" BorderBrush="{DynamicResource SystemAccentColor}"
BorderThickness="4" BorderThickness="4"
Padding="16"> Padding="16">
<TextBlock>Border and Background</TextBlock> <TextBlock>Border and Background</TextBlock>
</Border> </Border>
<Border BorderBrush="{DynamicResource ThemeAccentBrush}" <Border BorderBrush="{DynamicResource SystemAccentColor}"
BorderThickness="4" BorderThickness="4"
CornerRadius="8" CornerRadius="8"
Padding="16"> Padding="16">
<TextBlock>Rounded Corners</TextBlock> <TextBlock>Rounded Corners</TextBlock>
</Border> </Border>
<Border Background="{DynamicResource ThemeAccentBrush2}" <Border Background="{DynamicResource SystemAccentColor}"
CornerRadius="8" CornerRadius="8"
Padding="16"> Padding="16">
<TextBlock>Rounded Corners</TextBlock> <TextBlock>Rounded Corners</TextBlock>
</Border> </Border>
<Border BorderBrush="{DynamicResource ThemeAccentBrush2}" Width="100" Height="100" <Border Width="100" Height="100"
BorderThickness="0" BorderThickness="0"
Background="White" Background="White"
CornerRadius="100" ClipToBounds="True"> CornerRadius="100" ClipToBounds="True">

10
samples/ControlCatalog/Pages/ButtonPage.xaml

@ -12,7 +12,7 @@
<StackPanel Orientation="Vertical" Spacing="8" Width="200"> <StackPanel Orientation="Vertical" Spacing="8" Width="200">
<Button>Standard XAML Button</Button> <Button>Standard XAML Button</Button>
<Button Foreground="White">Foreground</Button> <Button Foreground="White">Foreground</Button>
<Button Background="{DynamicResource ThemeAccentBrush}">Background</Button> <Button Background="{DynamicResource SystemAccentColor}">Background</Button>
<Button IsEnabled="False">Disabled</Button> <Button IsEnabled="False">Disabled</Button>
<Button Content="Re-themed"> <Button Content="Re-themed">
<Button.Styles> <Button.Styles>
@ -32,10 +32,10 @@
<StackPanel Orientation="Vertical" Spacing="8" Width="150"> <StackPanel Orientation="Vertical" Spacing="8" Width="150">
<Button BorderThickness="0">No Border</Button> <Button BorderThickness="0">No Border</Button>
<Button BorderBrush="{DynamicResource ThemeAccentBrush}">Border Color</Button> <Button BorderBrush="{DynamicResource SystemAccentColor}">Border Color</Button>
<Button BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="4">Thick Border</Button> <Button BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="4">Thick Border</Button>
<Button BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="4" IsEnabled="False">Disabled</Button> <Button BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="4" IsEnabled="False">Disabled</Button>
<Button BorderBrush="{DynamicResource ThemeAccentBrush}" KeyboardNavigation.IsTabStop="False">IsTabStop=False</Button> <Button BorderBrush="{DynamicResource SystemAccentColor}" KeyboardNavigation.IsTabStop="False">IsTabStop=False</Button>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>

2
samples/ControlCatalog/Pages/ComboBoxPage.xaml

@ -16,7 +16,7 @@
<ComboBox SelectedIndex="0"> <ComboBox SelectedIndex="0">
<ComboBoxItem> <ComboBoxItem>
<Panel> <Panel>
<Rectangle Fill="{DynamicResource ThemeAccentBrush}"/> <Rectangle Fill="{DynamicResource SystemAccentColor}"/>
<TextBlock Margin="8">Control Items</TextBlock> <TextBlock Margin="8">Control Items</TextBlock>
</Panel> </Panel>
</ComboBoxItem> </ComboBoxItem>

4
samples/ControlCatalog/Pages/ContextMenuPage.xaml

@ -9,7 +9,7 @@
Margin="0,16,0,0" Margin="0,16,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Spacing="16"> Spacing="16">
<Border Background="{DynamicResource ThemeAccentBrush}" <Border Background="{DynamicResource SystemAccentColor}"
Margin="16" Margin="16"
Padding="48,48,48,48"> Padding="48,48,48,48">
<Border.ContextMenu> <Border.ContextMenu>
@ -34,7 +34,7 @@
</Border.ContextMenu> </Border.ContextMenu>
<TextBlock Text="Defined in XAML"/> <TextBlock Text="Defined in XAML"/>
</Border> </Border>
<Border Background="{DynamicResource ThemeAccentBrush}" <Border Background="{DynamicResource SystemAccentColor}"
Margin="16" Margin="16"
Padding="48,48,48,48"> Padding="48,48,48,48">
<Border.ContextMenu> <Border.ContextMenu>

6
samples/ControlCatalog/Pages/DragAndDropPage.xaml

@ -10,15 +10,15 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
Spacing="16"> Spacing="16">
<StackPanel> <StackPanel>
<Border BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="2" Padding="16" Name="DragMeText"> <Border BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="2" Padding="16" Name="DragMeText">
<TextBlock Name="DragStateText">Drag Me</TextBlock> <TextBlock Name="DragStateText">Drag Me</TextBlock>
</Border> </Border>
<Border BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="2" Padding="16" Name="DragMeCustom"> <Border BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="2" Padding="16" Name="DragMeCustom">
<TextBlock Name="DragStateCustom">Drag Me (custom)</TextBlock> <TextBlock Name="DragStateCustom">Drag Me (custom)</TextBlock>
</Border> </Border>
</StackPanel> </StackPanel>
<Border Background="{DynamicResource ThemeAccentBrush2}" Padding="16" <Border Background="{DynamicResource SystemAccentColorDark1}" Padding="16"
DragDrop.AllowDrop="True"> DragDrop.AllowDrop="True">
<TextBlock Name="DropState">Drop some text or files here</TextBlock> <TextBlock Name="DropState">Drop some text or files here</TextBlock>
</Border> </Border>

8
samples/ControlCatalog/Pages/LayoutTransformControlPage.xaml

@ -11,10 +11,10 @@
RowDefinitions="24,Auto,24" RowDefinitions="24,Auto,24"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Border Background="{DynamicResource ThemeAccentBrush}" Grid.Column="1" Grid.Row="0"/> <Border Background="{DynamicResource SystemAccentColor}" Grid.Column="1" Grid.Row="0"/>
<Border Background="{DynamicResource ThemeAccentBrush}" Grid.Column="0" Grid.Row="1"/> <Border Background="{DynamicResource SystemAccentColor}" Grid.Column="0" Grid.Row="1"/>
<Border Background="{DynamicResource ThemeAccentBrush}" Grid.Column="2" Grid.Row="1"/> <Border Background="{DynamicResource SystemAccentColor}" Grid.Column="2" Grid.Row="1"/>
<Border Background="{DynamicResource ThemeAccentBrush}" Grid.Column="1" Grid.Row="2"/> <Border Background="{DynamicResource SystemAccentColor}" Grid.Column="1" Grid.Row="2"/>
<LayoutTransformControl Name="layoutTransform" Grid.Column="1" Grid.Row="1"> <LayoutTransformControl Name="layoutTransform" Grid.Column="1" Grid.Row="1">
<LayoutTransformControl.LayoutTransform> <LayoutTransformControl.LayoutTransform>

4
samples/ControlCatalog/Pages/ToolTipPage.xaml

@ -12,7 +12,7 @@
HorizontalAlignment="Center"> HorizontalAlignment="Center">
<Border Grid.Column="0" <Border Grid.Column="0"
Grid.Row="1" Grid.Row="1"
Background="{DynamicResource ThemeAccentBrush}" Background="{DynamicResource SystemAccentColor}"
Margin="5" Margin="5"
Padding="50" Padding="50"
ToolTip.Tip="This is a ToolTip"> ToolTip.Tip="This is a ToolTip">
@ -26,7 +26,7 @@
<Border Name="Border" <Border Name="Border"
Grid.Column="1" Grid.Column="1"
Grid.Row="1" Grid.Row="1"
Background="{DynamicResource ThemeAccentBrush}" Background="{DynamicResource SystemAccentColor}"
Margin="5" Margin="5"
Padding="50" Padding="50"
ToolTip.Placement="Bottom"> ToolTip.Placement="Bottom">

4
samples/ControlCatalog/SideBar.xaml

@ -12,7 +12,7 @@
<Style Selector="TabControl.sidebar"> <Style Selector="TabControl.sidebar">
<Setter Property="TabStripPlacement" Value="Left"/> <Setter Property="TabStripPlacement" Value="Left"/>
<Setter Property="Padding" Value="8 0 0 0"/> <Setter Property="Padding" Value="8 0 0 0"/>
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColor}"/>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
@ -80,6 +80,6 @@
<Setter Property="Opacity" Value="1"/> <Setter Property="Opacity" Value="1"/>
</Style> </Style>
<Style Selector="TabControl.sidebar > TabItem:selected"> <Style Selector="TabControl.sidebar > TabItem:selected">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColorLight1}"/>
</Style> </Style>
</Styles> </Styles>

4
samples/RenderDemo/Pages/ClippingPage.xaml

@ -43,7 +43,7 @@
C 72.078834 28.113269 74.047517 25.960974 74.931641 23.777344 C 72.078834 28.113269 74.047517 25.960974 74.931641 23.777344
C 78.93827 14.586564 73.049722 2.8815081 63.248047 0.67382812 C 78.93827 14.586564 73.049722 2.8815081 63.248047 0.67382812
C 61.721916 0.22817968 60.165597 0.038541919 58.625 0.07421875 z "> C 61.721916 0.22817968 60.165597 0.038541919 58.625 0.07421875 z ">
<Border Name="clipChild" Background="{DynamicResource ThemeAccentBrush}" Margin="4"> <Border Name="clipChild" Background="Red" Margin="4">
<!-- Setting opacity puts the TextBox on a new layer --> <!-- Setting opacity puts the TextBox on a new layer -->
<TextBox Text="Avalonia" Opacity="0.9" VerticalAlignment="Center"/> <TextBox Text="Avalonia" Opacity="0.9" VerticalAlignment="Center"/>
<Border.RenderTransform> <Border.RenderTransform>
@ -53,4 +53,4 @@
</Border> </Border>
<CheckBox Name="useMask" IsChecked="True" Grid.Row="1">Apply Geometry Clip</CheckBox> <CheckBox Name="useMask" IsChecked="True" Grid.Row="1">Apply Geometry Clip</CheckBox>
</Grid> </Grid>
</UserControl> </UserControl>

4
samples/RenderDemo/SideBar.xaml

@ -3,7 +3,7 @@
<Style Selector="TabControl.sidebar"> <Style Selector="TabControl.sidebar">
<Setter Property="TabStripPlacement" Value="Left"/> <Setter Property="TabStripPlacement" Value="Left"/>
<Setter Property="Padding" Value="8 0 0 0"/> <Setter Property="Padding" Value="8 0 0 0"/>
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColor}"/>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
@ -60,6 +60,6 @@
<Setter Property="Opacity" Value="1"/> <Setter Property="Opacity" Value="1"/>
</Style> </Style>
<Style Selector="TabControl.sidebar > TabItem:selected /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="TabControl.sidebar > TabItem:selected /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColorLight1}"/>
</Style> </Style>
</Styles> </Styles>

2
src/Avalonia.Controls.DataGrid/Themes/Default.xaml

@ -188,7 +188,7 @@
</Style> </Style>
<Style Selector="DataGrid"> <Style Selector="DataGrid">
<Setter Property="RowBackground" Value="{DynamicResource ThemeAccentBrush4}" /> <Setter Property="RowBackground" Value="{DynamicResource SystemAccentColorDark2}" />
<Setter Property="AlternatingRowBackground" Value="#00FFFFFF" /> <Setter Property="AlternatingRowBackground" Value="#00FFFFFF" />
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" /> <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
<Setter Property="HeadersVisibility" Value="Column" /> <Setter Property="HeadersVisibility" Value="Column" />

4
src/Avalonia.Themes.Fluent/CalendarDatePicker.xaml

@ -53,7 +53,7 @@
Grid.RowSpan="1" Grid.RowSpan="1"
StrokeThickness="1" StrokeThickness="1"
Stroke="{DynamicResource ThemeBorderHighBrush}" Stroke="{DynamicResource ThemeBorderHighBrush}"
Fill="{DynamicResource ThemeAccentBrush}"> Fill="{DynamicResource SystemAccentColor}">
</Rectangle> </Rectangle>
<TextBlock Margin="0,-1,0,0" <TextBlock Margin="0,-1,0,0"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -80,7 +80,7 @@
</Style> </Style>
<Style Selector="Button.CalendarDropDown:pointerover /template/ Border#Background"> <Style Selector="Button.CalendarDropDown:pointerover /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush4}"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColorDark2}"/>
</Style> </Style>
</Grid.Styles> </Grid.Styles>

2
src/Avalonia.Themes.Fluent/ContextMenu.xaml

@ -1,7 +1,7 @@
<Style xmlns="https://github.com/avaloniaui" <Style xmlns="https://github.com/avaloniaui"
Selector="ContextMenu"> Selector="ContextMenu">
<Design.PreviewWith> <Design.PreviewWith>
<Border Background="{DynamicResource ThemeAccentBrush}" <Border Background="{DynamicResource SystemAccentColor}"
Margin="16" Margin="16"
Padding="48" Padding="48"
Width="400" Width="400"

2
src/Avalonia.Themes.Fluent/TextBox.xaml

@ -49,7 +49,7 @@
Margin="{TemplateBinding BorderThickness}"> Margin="{TemplateBinding BorderThickness}">
<DockPanel> <DockPanel>
<TextBlock Name="floatingWatermark" <TextBlock Name="floatingWatermark"
Foreground="{DynamicResource ThemeAccentBrush}" Foreground="{DynamicResource SystemAccentColor}"
FontSize="{DynamicResource FontSizeSmall}" FontSize="{DynamicResource FontSizeSmall}"
Text="{TemplateBinding Watermark}" Text="{TemplateBinding Watermark}"
DockPanel.Dock="Top"> DockPanel.Dock="Top">

Loading…
Cancel
Save