Skip to content

Commit

Permalink
fix: Adopt styles to changes in Avalonia 0.10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
worldbeater committed Feb 9, 2022
1 parent 0c5b86a commit 3a15ed6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Citrus.Avalonia.Sandbox/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource ThemeBackgroundColor}"
x:Class="Citrus.Avalonia.Sandbox.MainWindow"
Width="920" Height="630">
Width="950" Height="630">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
Expand Down
12 changes: 6 additions & 6 deletions src/Citrus.Avalonia/Theme/ButtonStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
<Setter Property="Margin" Value="0 5" />
<Setter Property="Background" Value="{DynamicResource HighlightBrush}" />
</Style>
<Style Selector="Button > TextBlock">
<Style Selector="Button">
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrush}" />
</Style>

<Style Selector="Button /template/ ContentPresenter">
<Style Selector="Button">
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="Button:pointerover">
<Setter Property="Background" Value="{DynamicResource HighlightHoverBrush}" />
</Style>
<Style Selector="Button:pressed /template/ ContentPresenter">
<Style Selector="Button:pressed">
<Setter Property="Background" Value="{DynamicResource HighlightBrush}" />
</Style>

<Style Selector="Button.Primary">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}" />
</Style>
<Style Selector="Button.Primary > TextBlock">
<Style Selector="Button.Primary">
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrush}" />
</Style>
<Style Selector="Button.Primary /template/ ContentPresenter">
<Style Selector="Button.Primary">
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="Button.Primary:pointerover">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush4}" />
</Style>
<Style Selector="Button.Primary:pressed /template/ ContentPresenter">
<Style Selector="Button.Primary:pressed">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}" />
</Style>
</Styles>
2 changes: 1 addition & 1 deletion src/Citrus.Avalonia/Theme/TextBoxStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Setter Property="Padding" Value="10" />
<Setter Property="Margin" Value="0 5" />
</Style>
<Style Selector="TextBox /template/ Border">
<Style Selector="TextBox">
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="TextBox:pointerover /template/ Border">
Expand Down
12 changes: 6 additions & 6 deletions src/Citrus.Avalonia/Theme/ToggleButtonStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<Setter Property="Background" Value="{DynamicResource ThemeBorderHighBrush}" />
</Style>

<Style Selector="ToggleButton > TextBlock">
<Style Selector="ToggleButton">
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrush}" />
</Style>
<Style Selector="ToggleButton /template/ ContentPresenter">
<Style Selector="ToggleButton">
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="ToggleButton:pointerover">
<Style Selector="ToggleButton:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeBorderHighBrush}" />
</Style>
<Style Selector="ToggleButton:pressed /template/ ContentPresenter">
Expand All @@ -25,13 +25,13 @@
<Style Selector="ToggleButton.Primary">
<Setter Property="Background" Value="{DynamicResource ThemeBorderHighBrush}" />
</Style>
<Style Selector="ToggleButton.Primary > TextBlock">
<Style Selector="ToggleButton.Primary">
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrush}" />
</Style>
<Style Selector="ToggleButton.Primary /template/ ContentPresenter">
<Style Selector="ToggleButton.Primary">
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="ToggleButton.Primary:pointerover">
<Style Selector="ToggleButton.Primary:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeBorderHighBrush}" />
</Style>
<Style Selector="ToggleButton.Primary:pressed /template/ ContentPresenter">
Expand Down

0 comments on commit 3a15ed6

Please sign in to comment.