Skip to content

Commit

Permalink
Added "Language" category in Settings (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Feb 16, 2022
1 parent 2636b75 commit 56f6eb9
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions ColorPicker/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ColorPicker.Pages"
xmlns:lang="clr-namespace:ColorPicker.Properties"
mc:Ignorable="d"
d:DesignHeight="344" d:DesignWidth="560"
d:DesignHeight="344" d:DesignWidth="560" Foreground="{Binding Source={StaticResource Foreground1}}"
FontFamily="../Fonts/#Montserrat"
Title="SettingsPage">

Expand Down Expand Up @@ -95,18 +95,34 @@
</StackPanel>
</Expander>

<TextBlock Text="{x:Static lang:Resources.Language}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
<TextBlock Text="{x:Static lang:Resources.Language}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14"/>
<Border CornerRadius="5" Margin="10,10,10,0" Background="{Binding Source={StaticResource Background2}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>

<StackPanel Margin="15,15,10,15" Orientation="Horizontal">
<TextBlock Text="&#xF834;" FontSize="22" FontFamily="..\Fonts\#FluentSystemIcons-Regular" VerticalAlignment="Center"/>
<StackPanel>
<TextBlock Text="{x:Static lang:Resources.Language}" FontSize="18" VerticalAlignment="Center" FontWeight="Bold" Margin="10,0,0,0"/>
<TextBlock Text="{x:Static lang:Resources.ChangeLanguage}" FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0" TextWrapping="Wrap"/>
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Grid.Column="1">
<ComboBox SelectionChanged="LangComboBox_SelectionChanged" BorderThickness="2" Padding="5" Style="{DynamicResource ComboBoxStyle1}" x:Name="LangComboBox" Background="Transparent" BorderBrush="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource Foreground1}}" HorizontalAlignment="Left" Margin="0,0,10,0" VerticalAlignment="Center"/>
<Button x:Name="LangApplyBtn" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Padding="10,5,10,5" Style="{DynamicResource TabButtonStyle}" FontWeight="Bold" Cursor="Hand" VerticalAlignment="Center" Click="LangApplyBtn_Click" Visibility="Hidden">
<TextBlock Text="&#xF680;" FontWeight="Regular" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,0,0" VerticalAlignment="Center"/>

<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.Apply}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
</StackPanel>
</Grid>
</Border>

<StackPanel Orientation="Horizontal">
<ComboBox SelectionChanged="LangComboBox_SelectionChanged" BorderThickness="2" Padding="5" Style="{DynamicResource ComboBoxStyle1}" x:Name="LangComboBox" Background="Transparent" BorderBrush="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource Foreground1}}" HorizontalAlignment="Left" Margin="0,5,10,0" VerticalAlignment="Center"/>
<Button x:Name="LangApplyBtn" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Padding="10,5,10,5" Style="{DynamicResource TabButtonStyle}" FontWeight="Bold" Cursor="Hand" VerticalAlignment="Center" Click="LangApplyBtn_Click" Visibility="Hidden">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xF296;" FontWeight="Regular" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="16"/>
<TextBlock Text="{x:Static lang:Resources.Apply}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>

<TextBlock Text="{x:Static lang:Resources.History}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
<CheckBox Margin="0 10 0 2" x:Name="RestoreColorHistoryOnStartChk" Style="{DynamicResource CheckBoxStyle1}" Content="{x:Static lang:Resources.RestoreColorHistory}" BorderThickness="3" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalContentAlignment="Center" Unchecked="RestoreColorHistoryOnStartChk_Checked" Checked="RestoreColorHistoryOnStartChk_Checked"/>
Expand Down

0 comments on commit 56f6eb9

Please sign in to comment.