Skip to content

Commit

Permalink
Improve WaveProgressBar Background and BorderBrush
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Dec 17, 2024
1 parent 18cceab commit 48be979
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
10 changes: 8 additions & 2 deletions dev/DevWinUI.Controls/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Themes\Styles\Win2D\Watermark.xaml
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushDisabled" ResourceKey="ControlAltFillColorSecondaryBrush" />
<Thickness x:Key="SelectorBarSegmentedBorderThickness">1</Thickness>
<StaticResource x:Key="WaveProgressBarBackground" ResourceKey="CardStrokeColorDefaultSolidBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="ProgressCompletedBackgroundBrush" ResourceKey="AccentAAFillColorDefaultBrush" />
<StaticResource x:Key="GooeyButtonBackgroundBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
<StaticResource x:Key="GooeyButtonForegroundBrush" ResourceKey="SystemControlForegroundAltHighBrush" />
Expand Down Expand Up @@ -177,6 +179,8 @@ Themes\Styles\Win2D\Watermark.xaml
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushPressed" ResourceKey="SubtleFillColorTertiaryBrush" />
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushDisabled" ResourceKey="ControlAltFillColorSecondaryBrush" />
<Thickness x:Key="SelectorBarSegmentedBorderThickness">1</Thickness>
<StaticResource x:Key="WaveProgressBarBackground" ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="ProgressCompletedBackgroundBrush" ResourceKey="AccentAAFillColorDefaultBrush" />
<StaticResource x:Key="GooeyButtonBackgroundBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
<StaticResource x:Key="GooeyButtonForegroundBrush" ResourceKey="SystemControlForegroundAltHighBrush" />
Expand Down Expand Up @@ -238,6 +242,8 @@ Themes\Styles\Win2D\Watermark.xaml
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushPressed" ResourceKey="ControlAltFillColorSecondaryBrush" />
<StaticResource x:Key="SelectorBarSegmentedItemBorderBrushDisabled" ResourceKey="ControlAltFillColorSecondaryBrush" />
<Thickness x:Key="SelectorBarSegmentedBorderThickness">1</Thickness>
<StaticResource x:Key="WaveProgressBarBackground" ResourceKey="SystemColorButtonFaceColorBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush" ResourceKey="SystemColorButtonTextColorBrush" />
<StaticResource x:Key="ProgressCompletedBackgroundBrush" ResourceKey="AccentAAFillColorDefaultBrush" />
<StaticResource x:Key="GooeyButtonBackgroundBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
<StaticResource x:Key="GooeyButtonForegroundBrush" ResourceKey="SystemControlForegroundAltHighBrush" />
Expand Down Expand Up @@ -5345,12 +5351,12 @@ Themes\Styles\Win2D\Watermark.xaml
<Style TargetType="local:WaveProgressBar">
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}" />
<Setter Property="WaveFill" Value="{ThemeResource AccentAAFillColorDefaultBrush}" />
<Setter Property="Background" Value="{ThemeResource CardStrokeColorDefaultSolidBrush}" />
<Setter Property="Background" Value="{ThemeResource WaveProgressBarBackground}" />
<Setter Property="WaveStroke" Value="{ThemeResource AccentAAFillColorSecondaryBrush}" />
<Setter Property="Width" Value="100" />
<Setter Property="WaveThickness" Value="2" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource WaveProgressBarBorderBrush}" />
<Setter Property="Text" Value="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource WaveProgressBarValueToPercentConverter}}" />
<Setter Property="Template">
<Setter.Value>
Expand Down
25 changes: 22 additions & 3 deletions dev/DevWinUI.Controls/Themes/Styles/Controls/WaveProgressBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,35 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Windows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)"
xmlns:local="using:DevWinUI">

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="WaveProgressBarBackground"
ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush"
ResourceKey="ControlElevationBorderBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="WaveProgressBarBackground"
ResourceKey="SystemColorButtonFaceColorBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush"
ResourceKey="SystemColorButtonTextColorBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="WaveProgressBarBackground"
ResourceKey="CardStrokeColorDefaultSolidBrush" />
<StaticResource x:Key="WaveProgressBarBorderBrush"
ResourceKey="ControlElevationBorderBrush" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<Style TargetType="local:WaveProgressBar">
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}" />
<Setter Property="WaveFill" Value="{ThemeResource AccentAAFillColorDefaultBrush}" />
<Setter Property="Background" Value="{ThemeResource CardStrokeColorDefaultSolidBrush}" />
<Setter Property="Background" Value="{ThemeResource WaveProgressBarBackground}" />
<Setter Property="WaveStroke" Value="{ThemeResource AccentAAFillColorSecondaryBrush}" />
<Setter Property="Width" Value="100" />
<Setter Property="WaveThickness" Value="2" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource WaveProgressBarBorderBrush}" />
<Setter Property="Text" Value="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource WaveProgressBarValueToPercentConverter}}" />
<Setter Property="Template">
<Setter.Value>
Expand Down

0 comments on commit 48be979

Please sign in to comment.