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

10
samples/ControlCatalog/Pages/BorderPage.xaml

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

10
samples/ControlCatalog/Pages/ButtonPage.xaml

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

2
samples/ControlCatalog/Pages/ComboBoxPage.xaml

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

4
samples/ControlCatalog/Pages/ContextMenuPage.xaml

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

6
samples/ControlCatalog/Pages/DragAndDropPage.xaml

@ -10,15 +10,15 @@
HorizontalAlignment="Center"
Spacing="16">
<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>
</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>
</Border>
</StackPanel>
<Border Background="{DynamicResource ThemeAccentBrush2}" Padding="16"
<Border Background="{DynamicResource SystemAccentColorDark1}" Padding="16"
DragDrop.AllowDrop="True">
<TextBlock Name="DropState">Drop some text or files here</TextBlock>
</Border>

8
samples/ControlCatalog/Pages/LayoutTransformControlPage.xaml

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

4
samples/ControlCatalog/Pages/ToolTipPage.xaml

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

4
samples/ControlCatalog/SideBar.xaml

@ -12,7 +12,7 @@
<Style Selector="TabControl.sidebar">
<Setter Property="TabStripPlacement" Value="Left"/>
<Setter Property="Padding" Value="8 0 0 0"/>
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemAccentColor}"/>
<Setter Property="Template">
<ControlTemplate>
<Border
@ -80,6 +80,6 @@
<Setter Property="Opacity" Value="1"/>
</Style>
<Style Selector="TabControl.sidebar > TabItem:selected">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}"/>
<Setter Property="Background" Value="{DynamicResource SystemAccentColorLight1}"/>
</Style>
</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 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 ">
<Border Name="clipChild" Background="{DynamicResource ThemeAccentBrush}" Margin="4">
<Border Name="clipChild" Background="Red" Margin="4">
<!-- Setting opacity puts the TextBox on a new layer -->
<TextBox Text="Avalonia" Opacity="0.9" VerticalAlignment="Center"/>
<Border.RenderTransform>
@ -53,4 +53,4 @@
</Border>
<CheckBox Name="useMask" IsChecked="True" Grid.Row="1">Apply Geometry Clip</CheckBox>
</Grid>
</UserControl>
</UserControl>

4
samples/RenderDemo/SideBar.xaml

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save