Skip to content

Commit

Permalink
fix dark theme for colors pages
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Aug 9, 2023
1 parent a19a66f commit 6ff1a98
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
1 change: 1 addition & 0 deletions WinUIGallery/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@

<Style x:Key="ColorTilesPanelStyle" TargetType="Grid">
<Style.Setters>
<Setter Property="Background" Value="{ThemeResource ControlExampleDisplayBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
<Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}" />
Expand Down
8 changes: 5 additions & 3 deletions WinUIGallery/ControlPages/DesignGuidance/ColorsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:controls1="using:WinUIGallery.DesktopWap.Controls"
mc:Ignorable="d">

<Page.Resources>
Expand Down Expand Up @@ -36,14 +36,16 @@
</RichTextBlock>
</StackPanel>

<ComboBox x:Name="PageSelector" SelectionChanged="OnSelectionChanged" Loaded="OnLoaded" Width="200" Margin="0,18,0,-18" Grid.Row="1" >
<ComboBox x:Name="PageSelector" AutomationProperties.Name="PageSelector" SelectionChanged="OnSelectionChanged" Loaded="OnLoaded" Width="200" Margin="0,18,0,-18" Grid.Row="1" >
<x:String>Text</x:String>
<x:String>Fill</x:String>
<x:String>Stroke</x:String>
<x:String>Background</x:String>
<x:String>Signal</x:String>
</ComboBox>

<Frame x:Name="NavigationFrame" Grid.Row="2" />
<controls1:SampleThemeListener Grid.Row="2">
<Frame x:Name="NavigationFrame" />
</controls1:SampleThemeListener>
</Grid>
</Page>
23 changes: 14 additions & 9 deletions WinUIGallery/Controls/DesignGuidance/ColorPageExample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,38 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
Background="{ThemeResource ControlExampleDisplayBrush}"
mc:Ignorable="d">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Margin="0,36,0,12"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Style="{ThemeResource SubtitleTextBlockStyle}"
Text="{x:Bind Title, Mode=OneWay}" />

<Grid
Grid.Row="1"
Padding="16"
Margin="0,36,0,12"
Padding="12"
Background="{x:Bind Background, Mode=OneWay}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource OverlayCornerRadius}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Style="{ThemeResource CaptionTextBlockStyle}" Text="{x:Bind Description, Mode=OneWay}" />

<TextBlock
Margin="0,0,0,12"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Style="{ThemeResource SubtitleTextBlockStyle}"
Text="{x:Bind Title, Mode=OneWay}" />

<TextBlock Style="{ThemeResource CaptionTextBlockStyle}" Text="{x:Bind Description, Mode=OneWay}" Grid.Row="1"/>
<ContentPresenter
Grid.Row="1"
Grid.Row="2"
Margin="0,16,0,16"
HorizontalAlignment="Center"
Content="{x:Bind ExampleContent, Mode=OneWay}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<ColumnDefinition Width=