Skip to content

Commit

Permalink
Redesigned "About" section in settings (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Jun 15, 2021
1 parent 6788f46 commit eba3a21
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
31 changes: 19 additions & 12 deletions ColorPicker/Pages/SettingsPage.xaml
Expand Up @@ -11,28 +11,35 @@
Title="SettingsPage">

<ScrollViewer HorizontalScrollBarVisibility="Hidden" Template="{DynamicResource ScrollViewerControlTemplate}" CanContentScroll="True" Height="344">
<Grid Height="600">
<Grid Height="640">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<StackPanel Margin="10,40,10,10" Grid.Row="0">
<TextBlock Text="{x:Static lang:Resources.Settings}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="16"/>

<TextBlock Text="{x:Static lang:Resources.Updates}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="UpdateStatusTxt" Text="{x:Static lang:Resources.Updates}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalAlignment="Center" Margin="0,0,15,0"/>
<Button x:Name="RefreshInstallBtn" Click="RefreshInstallBtn_Click" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Padding="10,5,10,5" Style="{StaticResource TabButtonStyle}" FontWeight="Bold" Cursor="Hand" VerticalAlignment="Center">
<Border Background="{Binding Source={StaticResource Background3}}" CornerRadius="10" Margin="10" Padding="10" HorizontalAlignment="Left">
<Border.Effect>
<DropShadowEffect Color="Black" ShadowDepth="0" BlurRadius="10" Opacity="0.4" RenderingBias="Quality"/>
</Border.Effect>
<StackPanel>
<TextBlock Text="{x:Static lang:Resources.ColorPicker}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="28" Margin="0,0,0,0"/>
<TextBlock x:Name="VersionTxt" Text="{x:Static lang:Resources.ColorPicker}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Normal" Margin="0,0,0,5" FontSize="14"/>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="InstallIconTxt" Text="&#xF152;" FontWeight="Regular" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="16"/>
<TextBlock x:Name="InstallMsgTxt" Text="{x:Static lang:Resources.Install}" VerticalAlignment="Center"/>
<TextBlock x:Name="UpdateStatusTxt" Text="{x:Static lang:Resources.Updates}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalAlignment="Center" Margin="0,0,15,0"/>
<Button x:Name="RefreshInstallBtn" Click="RefreshInstallBtn_Click" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Padding="10,5,10,5" Style="{StaticResource TabButtonStyle}" FontWeight="Bold" Cursor="Hand" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="InstallIconTxt" Text="&#xF152;" FontWeight="Regular" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="16"/>
<TextBlock x:Name="InstallMsgTxt" Text="{x:Static lang:Resources.Install}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
</Button>
</StackPanel>
<CheckBox Margin="0 10 0 2" x:Name="CheckUpdatesOnStartChk" Style="{DynamicResource CheckBoxStyle1}" Content="{x:Static lang:Resources.CheckUpdatesOnStart}" BorderThickness="3" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalContentAlignment="Center" Unchecked="CheckUpdatesOnStartChk_Checked" Checked="CheckUpdatesOnStartChk_Checked"/>
<CheckBox Margin="0 2 0 2" x:Name="NotifyUpdatesChk" Style="{DynamicResource CheckBoxStyle1}" Content="{x:Static lang:Resources.NotifyUpdates}" BorderThickness="3" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalContentAlignment="Center" Unchecked="NotifyUpdatesChk_Checked" Checked="NotifyUpdatesChk_Checked"/>

<CheckBox Margin="0 10 0 2" x:Name="CheckUpdatesOnStartChk" Style="{DynamicResource CheckBoxStyle1}" Content="{x:Static lang:Resources.CheckUpdatesOnStart}" BorderThickness="3" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalContentAlignment="Center" Unchecked="CheckUpdatesOnStartChk_Checked" Checked="CheckUpdatesOnStartChk_Checked"/>
<CheckBox Margin="0 2 0 2" x:Name="NotifyUpdatesChk" Style="{DynamicResource CheckBoxStyle1}" Content="{x:Static lang:Resources.NotifyUpdates}" BorderThickness="3" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14" VerticalContentAlignment="Center" Unchecked="NotifyUpdatesChk_Checked" Checked="NotifyUpdatesChk_Checked"/>
</StackPanel>
</Border>

<TextBlock Text="{x:Static lang:Resources.Theme}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
<TextBlock Text="{x:Static lang:Resources.ChangeTheme}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14"/>
Expand Down
2 changes: 2 additions & 0 deletions ColorPicker/Pages/SettingsPage.xaml.cs
Expand Up @@ -139,6 +139,8 @@ private async void InitUI()
InstallIconTxt.Text = "\uF191"; // Set text
}

VersionTxt.Text = Global.Version; // Set text

SettingsManager.Save(); // Save changes
}
catch (Exception ex)
Expand Down
1 change: 1 addition & 0 deletions ColorPicker/Themes/Dark.xaml
Expand Up @@ -4,6 +4,7 @@

<sys:String x:Key="Background1">#0A0A1E</sys:String>
<sys:String x:Key="Background2">#141428</sys:String>
<sys:String x:Key="Background3">#141428</sys:String>
<sys:String x:Key="Foreground1">#FFFFFF</sys:String>
<sys:String x:Key="WindowButtonsHover1">#141428</sys:String>
<sys:String x:Key="WindowButtonsPressed1">#1E1E32</sys:String>
Expand Down
1 change: 1 addition & 0 deletions ColorPicker/Themes/Light.xaml
Expand Up @@ -4,6 +4,7 @@

<sys:String x:Key="Background1">#ffffff</sys:String>
<sys:String x:Key="Background2">#e9e9e9</sys:String>
<sys:String x:Key="Background3">#ffffff</sys:String>
<sys:String x:Key="Foreground1">#000000</sys:String>
<sys:String x:Key="WindowButtonsHover1">#E5E5E5</sys:String>
<sys:String x:Key="WindowButtonsPressed1">#DBDBDB</sys:String>
Expand Down

0 comments on commit eba3a21

Please sign in to comment.