Skip to content

Commit

Permalink
update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane ANDRE (E104915) committed Sep 14, 2024
1 parent d572893 commit 812f1be
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/MyNet.Wpf.Presentation/Styles/MyNet.Edition.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<Style x:Key="MyNet.Styles.Button.Cancel"
x:Shared="False"
TargetType="{x:Type Button}"
BasedOn="{StaticResource MyNet.Styles.Button.Filled}">
BasedOn="{StaticResource MyNet.Styles.Button.Outlined}">
<Setter Property="Content" Value="{my:Resource Cancel}" />
<Setter Property="ToolTip" Value="Esc" />
<Setter Property="my:IconAssist.Icon" Value="{my:Icon Kind=Cancel}" />
Expand Down
2 changes: 1 addition & 1 deletion src/MyNet.Wpf.Presentation/Themes/MyNet.Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Styles\MyNet.Edition.xaml
<Setter Property="ToolTip" Value="Ctrl+S" />
<Setter Property="my:IconAssist.Icon" Value="{my:Icon Kind=Check}" />
</Style>
<Style x:Key="MyNet.Styles.Button.Cancel" x:Shared="False" TargetType="{x:Type Button}" BasedOn="{StaticResource MyNet.Styles.Button.Filled}">
<Style x:Key="MyNet.Styles.Button.Cancel" x:Shared="False" TargetType="{x:Type Button}" BasedOn="{StaticResource MyNet.Styles.Button.Outlined}">
<Setter Property="Content" Value="{my:Resource Cancel}" />
<Setter Property="ToolTip" Value="Esc" />
<Setter Property="my:IconAssist.Icon" Value="{my:Icon Kind=Cancel}" />
Expand Down
21 changes: 10 additions & 11 deletions src/MyNet.Wpf/Styles/MyNet.ContentDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
<Setter Property="HeaderForeground" Value="{DynamicResource MyNet.Brushes.Application.Foreground}" />
<Setter Property="HeaderHeight" Value="30" />
<Setter Property="HeaderPadding" Value="{StaticResource MyNet.Margins.Default}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Padding" Value="{StaticResource MyNet.Margins.Medium}" />
Expand All @@ -36,18 +34,17 @@

<!-- Header -->
<Grid DockPanel.Dock="Top">
<ctrl:Card Height="{TemplateBinding HeaderHeight}"
Padding="{TemplateBinding HeaderPadding}"
Background="{TemplateBinding HeaderBackground}"
FontSize="{TemplateBinding HeaderFontSize}"
Foreground="{TemplateBinding HeaderForeground}"
UniformCornerRadius="0"
Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static c:BooleanToVisibilityConverter.CollapsedIfFalse}}">
<Border Height="{TemplateBinding HeaderHeight}"
Padding="{TemplateBinding HeaderPadding}"
Background="{TemplateBinding HeaderBackground}"
Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static c:BooleanToVisibilityConverter.CollapsedIfFalse}}">
<ContentControl Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
Focusable="False" />
</ctrl:Card>
Focusable="False"
FontSize="{TemplateBinding HeaderFontSize}"
Foreground="{TemplateBinding HeaderForeground}" />
</Border>

<!-- Close Button -->
<Button Style="{StaticResource MyNet.Styles.Button.Text}"
Expand Down Expand Up @@ -76,5 +73,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
</Style>
</ResourceDictionary>
6 changes: 3 additions & 3 deletions src/MyNet.Wpf/Styles/MyNet.ExtendedWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@
</Style>

<Style x:Key="MyNet.Styles.ExtendedWindowDialog" TargetType="{x:Type ctrl:ExtendedWindowDialog}" BasedOn="{StaticResource MyNet.Styles.ExtendedWindow}">
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="NonActiveWindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Dialog.Background}" />
<!--<Setter Property="NonActiveWindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />-->
<Setter Property="ShowTitleBar" Value="False" />
<Setter Property="WindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<!--<Setter Property="WindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />-->
</Style>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion src/MyNet.Wpf/Styles/MyNet.OverlayDialogControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ResourceDictionary.MergedDictionaries>

<Style x:Key="MyNet.Styles.OverlayDialogControl" TargetType="{x:Type ctrl:OverlayDialogControl}">
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Dialog.Background}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="FontFamily" Value="{me:RobotoFont}" />
<Setter Property="FontSize" Value="{Binding Path=(TextElement.FontSize), RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}}" />
Expand Down
13 changes: 9 additions & 4 deletions src/MyNet.Wpf/Styles/Themes/Theme.Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<!-- Application -->
<Color x:Key="MyNet.Colors.Application.Background">#202020</Color>
<Color x:Key="MyNet.Colors.Application.Background.Light">#292929</Color>
<Color x:Key="MyNet.Colors.Application.Background.Dark">#141414</Color>
<Color x:Key="MyNet.Colors.Application.Background.Light">#2C2C2C</Color>
<Color x:Key="MyNet.Colors.Application.Background.Dark">#1A1A1A</Color>
<Color x:Key="MyNet.Colors.Application.Background.Inverse">#E8E8E8</Color>
<Color x:Key="MyNet.Colors.Application.Border">#393939</Color>
<Color x:Key="MyNet.Colors.Application.Border.Inactive">#333333</Color>
Expand All @@ -14,16 +14,19 @@
<Color x:Key="MyNet.Colors.Application.Foreground.Tertiary">#999999</Color>

<!-- Controls -->
<Color x:Key="MyNet.Colors.Control.Background">#404040</Color>
<Color x:Key="MyNet.Colors.Control.Background">#3F3F3F</Color>
<Color x:Key="MyNet.Colors.Control.Border">#525252</Color>
<Color x:Key="MyNet.Colors.Control.Border.Secondary">#777777</Color>
<Color x:Key="MyNet.Colors.Control.Border.Focus">#BFBFBF</Color>

<!-- Overlay -->
<Color x:Key="MyNet.Colors.Overlay">#66999999</Color>

<!-- Dialog -->
<Color x:Key="MyNet.Colors.Dialog.Background">#292929</Color>

<!-- Popup -->
<Color x:Key="MyNet.Colors.Popup.Background">#232323</Color>
<Color x:Key="MyNet.Colors.Popup.Background">#262626</Color>

<!-- ScrollBar -->
<Color x:Key="MyNet.Colors.ScrollBar.Background">#858585</Color>
Expand Down Expand Up @@ -57,6 +60,8 @@
<SolidColorBrush x:Key="MyNet.Brushes.Control.Border.Secondary" Color="{StaticResource MyNet.Colors.Control.Border.Secondary}" po:Freeze="true" />
<SolidColorBrush x:Key="MyNet.Brushes.Control.Border.Focus" Color="{StaticResource MyNet.Colors.Control.Border.Focus}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.Dialog.Background" Color="{StaticResource MyNet.Colors.Dialog.Background}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.Popup.Background" Color="{StaticResource MyNet.Colors.Popup.Background}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.ScrollBar.Background" Color="{StaticResource MyNet.Colors.ScrollBar.Background}" po:Freeze="true" />
Expand Down
7 changes: 6 additions & 1 deletion src/MyNet.Wpf/Styles/Themes/Theme.Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
<Color x:Key="MyNet.Colors.Application.Foreground.Tertiary">#707070</Color>

<!-- Controls -->
<Color x:Key="MyNet.Colors.Control.Background">#E7E7E7</Color>
<Color x:Key="MyNet.Colors.Control.Background">#E5E5E5</Color>
<Color x:Key="MyNet.Colors.Control.Border">#C5C5C5</Color>
<Color x:Key="MyNet.Colors.Control.Border.Secondary">#999999</Color>
<Color x:Key="MyNet.Colors.Control.Border.Focus">#646464</Color>

<!-- Dialog -->
<Color x:Key="MyNet.Colors.Dialog.Background">#f6f6f6</Color>

<!-- Popup -->
<Color x:Key="MyNet.Colors.Popup.Background">#FFFFFF</Color>

Expand Down Expand Up @@ -57,6 +60,8 @@
<SolidColorBrush x:Key="MyNet.Brushes.Control.Border.Secondary" Color="{StaticResource MyNet.Colors.Control.Border.Secondary}" po:Freeze="true" />
<SolidColorBrush x:Key="MyNet.Brushes.Control.Border.Focus" Color="{StaticResource MyNet.Colors.Control.Border.Focus}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.Dialog.Background" Color="{StaticResource MyNet.Colors.Dialog.Background}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.Popup.Background" Color="{StaticResource MyNet.Colors.Popup.Background}" po:Freeze="true" />

<SolidColorBrush x:Key="MyNet.Brushes.ScrollBar.Background" Color="{StaticResource MyNet.Colors.ScrollBar.Background}" po:Freeze="true" />
Expand Down
18 changes: 9 additions & 9 deletions src/MyNet.Wpf/Themes/MyNet.Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6934,10 +6934,10 @@ Styles\MyNet.VirtualizingWrapPanel.xaml
</Style.Triggers>
</Style>
<Style x:Key="MyNet.Styles.ExtendedWindowDialog" TargetType="{x:Type ctrl:ExtendedWindowDialog}" BasedOn="{StaticResource MyNet.Styles.ExtendedWindow}">
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="NonActiveWindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Dialog.Background}" />
<!--<Setter Property="NonActiveWindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />-->
<Setter Property="ShowTitleBar" Value="False" />
<Setter Property="WindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<!--<Setter Property="WindowTitleBrush" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />-->
</Style>
<Style x:Key="MyNet.Styles.Flipper" TargetType="{x:Type ctrl:Flipper}">
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
Expand Down Expand Up @@ -7627,7 +7627,7 @@ Styles\MyNet.VirtualizingWrapPanel.xaml
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="MyNet.Styles.OverlayDialogControl" TargetType="{x:Type ctrl:OverlayDialogControl}">
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Application.Background.Light}" />
<Setter Property="Background" Value="{DynamicResource MyNet.Brushes.Dialog.Background}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="FontFamily" Value="{me:RobotoFont}" />
<Setter Property="FontSize" Value="{Binding Path=(TextElement.FontSize), RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}}" />
Expand Down Expand Up @@ -15047,9 +15047,7 @@ Styles\MyNet.VirtualizingWrapPanel.xaml
<Setter Property="HeaderForeground" Value="{DynamicResource MyNet.Brushes.Application.Foreground}" />
<Setter Property="HeaderHeight" Value="30" />
<Setter Property="HeaderPadding" Value="{StaticResource MyNet.Margins.Default}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Padding" Value="{StaticResource MyNet.Margins.Medium}" />
Expand All @@ -15064,9 +15062,9 @@ Styles\MyNet.VirtualizingWrapPanel.xaml
</Grid.RowDefinitions>
<!-- Header -->
<Grid DockPanel.Dock="Top">
<ctrl:Card Height="{TemplateBinding HeaderHeight}" Padding="{TemplateBinding HeaderPadding}" Background="{TemplateBinding HeaderBackground}" FontSize="{TemplateBinding HeaderFontSize}" Foreground="{TemplateBinding HeaderForeground}" UniformCornerRadius="0" Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static c:BooleanToVisibilityConverter.CollapsedIfFalse}}">
<ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Focusable="False" />
</ctrl:Card>
<Border Height="{TemplateBinding HeaderHeight}" Padding="{TemplateBinding HeaderPadding}" Background="{TemplateBinding HeaderBackground}" Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static c:BooleanToVisibilityConverter.CollapsedIfFalse}}">
<ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Focusable="False" FontSize="{TemplateBinding HeaderFontSize}" Foreground="{TemplateBinding HeaderForeground}" />
</Border>
<!-- Close Button -->
<Button Style="{StaticResource MyNet.Styles.Button.Text}" Width="20" Height="20" Margin="{StaticResource MyNet.Margins.Default}" Padding="0" HorizontalAlignment="Right" Command="{x:Static ctrl:OverlayDialogControl.CloseDialogCommand}" Content="{me:Icon Kind=Close}" Focusable="False" ToolTip="{me:Resource Close}" Visibility="{Binding ShowCloseButton, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static c:BooleanToVisibilityConverter.CollapsedIfFalse}}" />
</Grid>
Expand All @@ -15078,6 +15076,8 @@ Styles\MyNet.VirtualizingWrapPanel.xaml
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
</Style>
<Style x:Key="MyNet.Styles.ToggleButton.Embedded.Expander.Horizontal.Alternate" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MyNet.Styles.Button.Rounded.Text}">
<Setter Property="ContentTemplate">
Expand Down

0 comments on commit 812f1be

Please sign in to comment.