Skip to content

Commit

Permalink
Added a "Credits" window (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Apr 17, 2022
1 parent 8f655d2 commit bc05e05
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 9 deletions.
25 changes: 16 additions & 9 deletions ColorPicker/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@
</Button>
<TextBlock x:Name="PressKeys2Txt" Text="{x:Static lang:Resources.PressKeys}" Visibility="Collapsed" VerticalAlignment="Center"/>
</StackPanel>
<TextBlock Text="{x:Static lang:Resources.NeedRestartLabel}" TextWrapping="Wrap" FontStyle="Italic" Margin="10,5,0,5"/>
</StackPanel>
<TextBlock Text="{x:Static lang:Resources.NeedRestartLabel}" TextWrapping="Wrap" FontStyle="Italic" Margin="10,5,0,5"/>
</StackPanel>
</Expander>

<Expander Style="{DynamicResource ExpanderStyle1}" Margin="10,10,10,0" Background="{Binding Source={StaticResource Background2}}" Foreground="{Binding Source={StaticResource Foreground1}}">
Expand Down Expand Up @@ -257,13 +257,20 @@
</StackPanel>
</StackPanel>
</Expander.Header>
<Button Click="Button_Click" Padding="5" Margin="10" Background="{x:Null}" Foreground="{Binding Source={StaticResource AccentColor}}" FontSize="14" FontWeight="Bold" Cursor="Hand" Style="{DynamicResource LinkButtonStyle}" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xF583;" FontFamily="..\Fonts\#FluentSystemIcons-Regular" FontWeight="Regular" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock Text="{x:Static lang:Resources.SeeLicenses}" VerticalAlignment="Center"/>
</StackPanel>
</Button>

<StackPanel>
<Button Click="Button_Click" Padding="5" Margin="10,10,10,0" Background="{x:Null}" Foreground="{Binding Source={StaticResource AccentColor}}" FontSize="14" FontWeight="Bold" Cursor="Hand" Style="{DynamicResource LinkButtonStyle}" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xF583;" FontFamily="..\Fonts\#FluentSystemIcons-Regular" FontWeight="Regular" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock Text="{x:Static lang:Resources.SeeLicenses}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button x:Name="CreditsBtn" Foreground="{Binding Source={StaticResource AccentColor}}" FontSize="14" FontWeight="Bold" Cursor="Hand" Click="CreditsBtn_Click" HorizontalAlignment="Left" Style="{DynamicResource LinkButtonStyle}" Padding="5" Margin="10,0,10,10" Background="{x:Null}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xF583;" FontFamily="..\Fonts\#FluentSystemIcons-Regular" FontWeight="Regular" Margin="0,0,10,0" VerticalAlignment="Center"/>
<TextBlock Text="{x:Static lang:Resources.CreditsAndThanks}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
</Expander>
</StackPanel>
</Grid>
Expand Down
9 changes: 9 additions & 0 deletions ColorPicker/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,15 @@ private void EditCopyShortcutBtn_Click(object sender, RoutedEventArgs e)
}
}

private void CreditsBtn_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show($"{Properties.Resources.CreditsAndThanks}\n\n" +
$"@dependabot\n" +
$"@Leo-Peyronnet\n" +
$"@wcxu21",
Properties.Resources.CreditsAndThanks, MessageBoxButton.OK, MessageBoxImage.Information);
}

private void EditSelectShortcutBtn_Click(object sender, RoutedEventArgs e)
{
keys = new(); // Create new list
Expand Down
9 changes: 9 additions & 0 deletions ColorPicker/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -483,4 +483,7 @@
<data name="NeedRestartLabel" xml:space="preserve">
<value>ColorPicker needs to restart to apply the changes.</value>
</data>
<data name="CreditsAndThanks" xml:space="preserve">
<value>Credits and special thanks</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -483,4 +483,7 @@
<data name="NeedRestartLabel" xml:space="preserve">
<value>ColorPicker doit redémarrer pour appliquer les changements.</value>
</data>
<data name="CreditsAndThanks" xml:space="preserve">
<value>Crédits et remerciements</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,7 @@
<data name="NeedRestartLabel" xml:space="preserve">
<value>ColorPicker needs to restart to apply the changes.</value>
</data>
<data name="CreditsAndThanks" xml:space="preserve">
<value>Credits and special thanks</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -483,4 +483,7 @@
<data name="NeedRestartLabel" xml:space="preserve">
<value>ColorPicker needs to restart to apply the changes.</value>
</data>
<data name="CreditsAndThanks" xml:space="preserve">
<value>Credits and special thanks</value>
</data>
</root>

0 comments on commit bc05e05

Please sign in to comment.