Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix color resource names #2023

Merged
merged 2 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/ControlCatalog/Pages/ButtonPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Style>
<Style.Resources>
<SolidColorBrush x:Key="ThemeBorderMidBrush">Red</SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlDarkBrush">DarkRed</SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighBrush">DarkRed</SolidColorBrush>
</Style.Resources>
</Style>
</Button.Styles>
Expand Down
32 changes: 16 additions & 16 deletions src/Avalonia.Themes.Default/Accents/BaseLight.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@
<Color x:Key="ThemeAccentColor4">#33119EDA</Color>

<Color x:Key="ThemeBackgroundColor">#FFFFFFFF</Color>
<Color x:Key="ThemeBorderLightColor">#FFAAAAAA</Color>
<Color x:Key="ThemeBorderLowColor">#FFAAAAAA</Color>
<Color x:Key="ThemeBorderMidColor">#FF888888</Color>
<Color x:Key="ThemeBorderDarkColor">#FF333333</Color>
<Color x:Key="ThemeControlLightColor">#FFFFFFFF</Color>
<Color x:Key="ThemeBorderHighColor">#FF333333</Color>
<Color x:Key="ThemeControlLowColor">#FFFFFFFF</Color>
<Color x:Key="ThemeControlMidColor">#FFAAAAAA</Color>
<Color x:Key="ThemeControlDarkColor">#FF888888</Color>
<Color x:Key="ThemeControlHighlightLightColor">#FFF0F0F0</Color>
<Color x:Key="ThemeControlHighColor">#FF888888</Color>
<Color x:Key="ThemeControlHighlightLowColor">#FFF0F0F0</Color>
<Color x:Key="ThemeControlHighlightMidColor">#FFD0D0D0</Color>
<Color x:Key="ThemeControlHighlightDarkColor">#FF808080</Color>
<Color x:Key="ThemeControlHighlightHighColor">#FF808080</Color>
<Color x:Key="ThemeForegroundColor">#FF000000</Color>
<Color x:Key="ThemeForegroundLightColor">#FF808080</Color>
<Color x:Key="ThemeForegroundLowColor">#FF808080</Color>

<Color x:Key="HighlightColor">#FF086F9E</Color>
<Color x:Key="ErrorColor">#FFFF0000</Color>
<Color x:Key="ErrorLightColor">#10FF0000</Color>
<Color x:Key="ErrorLowColor">#10FF0000</Color>

<SolidColorBrush x:Key="ThemeBackgroundBrush" Color="{DynamicResource ThemeBackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderLightBrush" Color="{DynamicResource ThemeBorderLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderLowBrush" Color="{DynamicResource ThemeBorderLowColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderMidBrush" Color="{DynamicResource ThemeBorderMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderDarkBrush" Color="{DynamicResource ThemeBorderDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlLightBrush" Color="{DynamicResource ThemeControlLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderHighBrush" Color="{DynamicResource ThemeBorderHighColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlLowBrush" Color="{DynamicResource ThemeControlLowColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlMidBrush" Color="{DynamicResource ThemeControlMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlDarkBrush" Color="{DynamicResource ThemeControlDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightLightBrush" Color="{DynamicResource ThemeControlHighlightLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighBrush" Color="{DynamicResource ThemeControlHighColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightLowBrush" Color="{DynamicResource ThemeControlHighlightLowColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightMidBrush" Color="{DynamicResource ThemeControlHighlightMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightDarkBrush" Color="{DynamicResource ThemeControlHighlightDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightHighBrush" Color="{DynamicResource ThemeControlHighlightHighColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource ThemeForegroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeForegroundLightBrush" Color="{DynamicResource ThemeForegroundLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeForegroundLowBrush" Color="{DynamicResource ThemeForegroundLowColor}"></SolidColorBrush>

<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource HighlightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush" Color="{DynamicResource ThemeAccentColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush2" Color="{DynamicResource ThemeAccentColor2}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush3" Color="{DynamicResource ThemeAccentColor3}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush4" Color="{DynamicResource ThemeAccentColor4}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorBrush" Color="{DynamicResource ErrorColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorLightBrush" Color="{DynamicResource ErrorLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorLowBrush" Color="{DynamicResource ErrorLowColor}"></SolidColorBrush>

<Thickness x:Key="ThemeBorderThickness">2</Thickness>
<sys:Double x:Key="ThemeDisabledOpacity">0.5</sys:Double>
Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Themes.Default/Button.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="Button">
<Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLightBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLowBrush}"/>
<Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
Expand All @@ -26,7 +26,7 @@
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}"/>
</Style>
<Style Selector="Button:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeControlDarkBrush}"/>
<Setter Property="Background" Value="{DynamicResource ThemeControlHighBrush}"/>
</Style>
<Style Selector="Button:disabled">
<Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/ButtonSpinner.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="ButtonSpinner">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLightBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLowBrush}"/>
<Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/Calendar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Style Selector="Calendar">
<!--<Setter Property="Focusable" Value="False" />-->
<Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
<Setter Property="HeaderBackground" Value="{DynamicResource ThemeAccentBrush2}" />
<Setter Property="Template">
Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Themes.Default/CalendarButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="CalendarButton">
<Setter Property="Foreground" Value="{DynamicResource ThemeBorderDarkBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ThemeBorderHighBrush}" />
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}" />
<Setter Property="FontSize" Value="{DynamicResource FontSizeSmall}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
Expand Down Expand Up @@ -68,7 +68,7 @@
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
</Style>
<Style Selector="CalendarButton:inactive /template/ ContentControl#Content">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundLightBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundLowBrush}"/>
</Style>


Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Themes.Default/CalendarDayButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@


<Style Selector="CalendarDayButton:inactive /template/ ContentControl#Content">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundLightBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundLowBrush}"/>
</Style>
<Style Selector="CalendarDayButton:today /template/ ContentControl#Content">
<Setter Property="Foreground" Value="{DynamicResource ThemeControlLightBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeControlLowBrush}"/>
</Style>

<Style Selector="CalendarDayButton /template/ Path#BlackoutVisual">
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/CalendarItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@

<Rectangle Name="DisabledVisual"
Stretch="Fill"
Fill="{DynamicResource ThemeControlLightBrush}"
Fill="{DynamicResource ThemeControlLowBrush}"
Opacity="{DynamicResource ThemeDisabledOpacity}"
Margin="0,2,0,2" />

Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/CheckBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<Setter Property="IsVisible" Value="False"/>
</Style>
<Style Selector="CheckBox:pointerover /template/ Border#border">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}"/>
</Style>
<Style Selector="CheckBox /template/ Path#checkMark">
<Setter Property="IsVisible" Value="False"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/DataValidationErrors.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Background="Transparent">
<Canvas.Styles>
<Style Selector="ToolTip">
<Setter Property="Background" Value="{DynamicResource ErrorLightBrush}"/>
<Setter Property="Background" Value="{DynamicResource ErrorLowBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/>
</Style>
</Canvas.Styles>
Expand Down
12 changes: 6 additions & 6 deletions src/Avalonia.Themes.Default/DatePicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0"
Background="{DynamicResource ThemeControlLightBrush}"
Background="{DynamicResource ThemeControlLowBrush}"
ColumnDefinitions="*,*,*,*"
RowDefinitions="23*,19*,19*,19*"
ClipToBounds="False">
Expand All @@ -47,12 +47,12 @@
Grid.Row="1"
Grid.RowSpan="3"
BorderThickness="1"
BorderBrush="{DynamicResource ThemeBorderDarkBrush}"
BorderBrush="{DynamicResource ThemeBorderHighBrush}"
CornerRadius=".5" />
<Rectangle Grid.ColumnSpan="4"
Grid.RowSpan="1"
StrokeThickness="1"
Stroke="{DynamicResource ThemeBorderDarkBrush}"
Stroke="{DynamicResource ThemeBorderHighBrush}"
Fill="{DynamicResource ThemeAccentBrush}">
</Rectangle>
<TextBlock Margin="0,-1,0,0"
Expand All @@ -63,13 +63,13 @@
Grid.ColumnSpan="4"
Grid.RowSpan="3"
FontSize="{DynamicResource FontSizeSmall}"
Foreground="{DynamicResource ThemeBorderDarkBrush}">
Foreground="{DynamicResource ThemeBorderHighBrush}">
<TextBlock.Text>
<Binding Source="{x:Static sys:DateTime.Today}" Path="Day"/>
</TextBlock.Text>
</TextBlock>

<Ellipse HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource ThemeControlLightBrush}" StrokeThickness="0" Grid.ColumnSpan="4" Width="3" Height="3"/>
<Ellipse HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource ThemeControlLowBrush}" StrokeThickness="0" Grid.ColumnSpan="4" Width="3" Height="3"/>
</Grid>
</ControlTemplate>
</Setter>
Expand Down Expand Up @@ -123,7 +123,7 @@
</Style>

<Style Selector="DatePicker:focus /template/ TextBox#PART_TextBox">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}"/>
</Style>

</Styles>
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/DropDown.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
</Setter>
</Style>
<Style Selector="DropDown:pointerover /template/ Border#border">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}"/>
</Style>
</Styles>
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/Expander.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
</Setter>
</Style>
<Style Selector="Expander /template/ ToggleButton#PART_toggle:pointerover /template/ Border">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLightBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLowBrush}" />
</Style>
<Style Selector="Expander:down:expanded /template/ ToggleButton#PART_toggle /template/ Path">
<Setter Property="RenderTransform">
Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Themes.Default/GridSplitter.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="GridSplitter:vertical">
<Setter Property="Width" Value="6"/>
<Setter Property="Background" Value="{DynamicResource ThemeControlLightBrush}"/>
<Setter Property="Background" Value="{DynamicResource ThemeControlLowBrush}"/>
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}">
Expand All @@ -25,7 +25,7 @@
</Style>
<Style Selector="GridSplitter:horizontal">
<Setter Property="Height" Value="6"/>
<Setter Property="Background" Value="{DynamicResource ThemeControlLightBrush}"/>
<Setter Property="Background" Value="{DynamicResource ThemeControlLowBrush}"/>
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}">
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/NumericUpDown.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="NumericUpDown">
<Setter Property="TemplatedControl.BorderBrush" Value="{DynamicResource ThemeBorderLightBrush}"/>
<Setter Property="TemplatedControl.BorderBrush" Value="{DynamicResource ThemeBorderLowBrush}"/>
<Setter Property="TemplatedControl.BorderThickness" Value="{DynamicResource ThemeBorderThickness}"/>
<Setter Property="TemplatedControl.Background" Value="{DynamicResource ThemeBackgroundBrush}" />
<Setter Property="TemplatedControl.Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Themes.Default/RadioButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</Setter>
</Style>
<Style Selector="RadioButton:pointerover /template/ Ellipse#border">
<Setter Property="Stroke" Value="{DynamicResource ThemeBorderDarkBrush}"/>
<Setter Property="Stroke" Value="{DynamicResource ThemeBorderHighBrush}"/>
</Style>
<Style Selector="RadioButton /template/ Ellipse#checkMark">
<Setter Property="IsVisible" Value="False"/>
Expand Down
4 changes: 2 additions & 2 deletions src/Avalonia.Themes.Default/RepeatButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Setter Property="Background"
Value="{DynamicResource ThemeControlMidBrush}" />
<Setter Property="BorderBrush"
Value="{DynamicResource ThemeBorderLightBrush}" />
Value="{DynamicResource ThemeBorderLowBrush}" />
<Setter Property="BorderThickness"
Value="{DynamicResource ThemeBorderThickness}" />
<Setter Property="Foreground"
Expand Down Expand Up @@ -35,7 +35,7 @@
</Style>
<Style Selector="RepeatButton:pressed /template/ ContentPresenter">
<Setter Property="Background"
Value="{DynamicResource ThemeControlDarkBrush}" />
Value="{DynamicResource ThemeControlHighBrush}" />
</Style>
<Style Selector="RepeatButton:disabled">
<Setter Property="Opacity"
Expand Down
12 changes: 6 additions & 6 deletions src/Avalonia.Themes.Default/ScrollBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Grid.Column="0">
<Path Data="M 0,4 C0,4 0,6 0,6 0,6 3.5,2.5 3.5,2.5 3.5,2.5 7,6 7,6 7,6 7,4 7,4 7,4 3.5,0.5 3.5,0.5 3.5,0.5 0,4 0,4 z"
Stretch="Uniform"
Fill="{DynamicResource ThemeForegroundLightBrush}" />
Fill="{DynamicResource ThemeForegroundLowBrush}" />
</RepeatButton>
<Track Grid.Row="1"
Grid.Column="1"
Expand All @@ -30,7 +30,7 @@
<Thumb Name="thumb">
<Thumb.Template>
<ControlTemplate>
<Border Background="{DynamicResource ThemeControlDarkBrush}" />
<Border Background="{DynamicResource ThemeControlHighBrush}" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
Expand All @@ -41,7 +41,7 @@
Grid.Column="2">
<Path Data="M 0,2.5 C0,2.5 0,0.5 0,0.5 0,0.5 3.5,4 3.5,4 3.5,4 7,0.5 7,0.5 7,0.5 7,2.5 7,2.5 7,2.5 3.5,6 3.5,6 3.5,6 0,2.5 0,2.5 z"
Stretch="Uniform"
Fill="{DynamicResource ThemeForegroundLightBrush}" />
Fill="{DynamicResource ThemeForegroundLowBrush}" />
</RepeatButton>
</Grid>
</Border>
Expand All @@ -61,7 +61,7 @@
Grid.Column="0">
<Path Data="M 3.18,7 C3.18,7 5,7 5,7 5,7 1.81,3.5 1.81,3.5 1.81,3.5 5,0 5,0 5,0 3.18,0 3.18,0 3.18,0 0,3.5 0,3.5 0,3.5 3.18,7 3.18,7 z"
Stretch="Uniform"
Fill="{DynamicResource ThemeForegroundLightBrush}" />
Fill="{DynamicResource ThemeForegroundLowBrush}" />
</RepeatButton>
<Track Grid.Row="1"
Grid.Column="1"
Expand All @@ -81,7 +81,7 @@
<Thumb Name="thumb">
<Thumb.Template>
<ControlTemplate>
<Border Background="{DynamicResource ThemeControlDarkBrush}" />
<Border Background="{DynamicResource ThemeControlHighBrush}" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
Expand All @@ -92,7 +92,7 @@
Grid.Column="2">
<Path Data="M 1.81,7 C1.81,7 0,7 0,7 0,7 3.18,3.5 3.18,3.5 3.18,3.5 0,0 0,0 0,0 1.81,0 1.81,0 1.81,0 5,3.5 5,3.5 5,3.5 1.81,7 1.81,7 z"
Stretch="Uniform"
Fill="{DynamicResource ThemeForegroundLightBrush}" />
Fill="{DynamicResource ThemeForegroundLowBrush}" />
</RepeatButton>
</Grid>
</Border>
Expand Down
Loading