Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #77 from Hexer10/#51_Button_Default_Colors
Browse files Browse the repository at this point in the history
Added default color values button in settings
  • Loading branch information
maxijabase authored Feb 18, 2021
2 parents 15284ec + f374bb8 commit f8a6590
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Interop/OptionsControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void ReCreateCryptoKey()
Program_CryptoKey = buffer;
}

private void NormalizeSHColors()
public void NormalizeSHColors()
{
SH_Comments = new SerializeableColor(0xFF, 0x57, 0xA6, 0x49);
SH_CommentsMarker = new SerializeableColor(0xFF, 0xFF, 0x20, 0x20);
Expand Down
1 change: 1 addition & 0 deletions Interop/TranslationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ private void FillToEnglishDefaults()
language.Add("ErrorSavingConfigs", "Could not save the current configs state");
language.Add("DuplicateConfigNames", "You cannot have 2 configs or more with the same name.");
language.Add("EmptyConfigNames", "You cannot have configs with an empty name.");
language.Add("DefaultValues", "Default values");
}
}
}
2 changes: 1 addition & 1 deletion UI/Windows/OptionsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,255,0,5">

<CheckBox Name="HighlightDeprecateds" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" Content="Highlight Deprecated (&lt;1.7) Syntax" Checked="HighlightDeprecateds_Changed" Unchecked="HighlightDeprecateds_Changed" />

<Button x:Name="DefaultButton" Margin="528,10,30,852" Click="DefaultButton_Click" Content="Default values" FontWeight="Bold"/>
<components:ColorChangeControl x:Name="SH_Comments" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,40,0,0" Height="105" Width="300" ColorChanged="Comments_Changed" />
<components:ColorChangeControl x:Name="SH_CommentMarkers" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="335,40,5,0" Height="105" Width="300" ColorChanged="CommentMarker_Changed" />

Expand Down
7 changes: 7 additions & 0 deletions UI/Windows/OptionsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ private void Language_Translate()
SyntaxHighBlock.Text = Program.Translations.GetLanguage("SyntaxHigh");
HighlightDeprecateds.Content = Program.Translations.GetLanguage("HighDeprecat");
AutoSaveBlock.Text = Program.Translations.GetLanguage("AutoSaveMin");
DefaultButton.Content = Program.Translations.GetLanguage("DefaultValues");
}

private void DefaultButton_Click(object sender, RoutedEventArgs e)
{
Program.OptionsObject.NormalizeSHColors();
LoadSH();
}
}

Expand Down

0 comments on commit f8a6590

Please sign in to comment.