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

Commit 8aadcb1

Browse files
committed
re-added options title bar and reset button
1 parent d6be952 commit 8aadcb1

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

UI/Windows/OptionsWindow.xaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
WindowStartupLocation="CenterOwner"
1010
GlowBrush="{DynamicResource AccentColorBrush}"
1111
Background="{DynamicResource WhiteBrush}"
12-
ShowTitleBar="False"
12+
ShowTitleBar="True"
13+
Title="Options"
14+
TitleCharacterCasing="Normal"
1315
KeyDown="MetroWindow_KeyDown">
1416

1517
<controls:MetroWindow.Resources>
@@ -39,9 +41,15 @@
3941
</ResourceDictionary>
4042
</controls:MetroWindow.Resources>
4143

44+
<controls:MetroWindow.RightWindowCommands>
45+
<controls:WindowCommands>
46+
<Button Name="ResetButton" Content="Reset options to default" Click="RestoreButton_Clicked" />
47+
</controls:WindowCommands>
48+
</controls:MetroWindow.RightWindowCommands>
49+
4250
<Grid>
4351

44-
<controls:MetroAnimatedSingleRowTabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,15,0,0" controls:TabControlHelper.IsUnderlined="True">
52+
<controls:MetroAnimatedSingleRowTabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,0,0" controls:TabControlHelper.IsUnderlined="True">
4553

4654
<!-- Program Tab -->
4755
<controls:MetroTabItem Name="ProgramHeader" Header=" Program ">

UI/Windows/OptionsWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ private void MetroWindow_KeyDown(object sender, KeyEventArgs e)
7777
private async void RestoreButton_Clicked(object sender, RoutedEventArgs e)
7878
{
7979
var result = await this.ShowMessageAsync(Translate("ResetOptions"),
80-
Translate("ResetOptQues"), MessageDialogStyle.AffirmativeAndNegative);
80+
Translate("ResetOptQues"), MessageDialogStyle.AffirmativeAndNegative, Program.MainWindow.MetroDialogOptions);
8181
if (result == MessageDialogResult.Affirmative)
8282
{
8383
Program.OptionsObject = new OptionsControl();
8484
Program.OptionsObject.ReCreateCryptoKey();
8585
Program.MainWindow.OptionMenuEntry.IsEnabled = false;
8686
await this.ShowMessageAsync(Translate("RestartEditor"),
8787
Translate("YRestartEditor"), MessageDialogStyle.Affirmative,
88-
MetroDialogOptions);
88+
Program.MainWindow.MetroDialogOptions);
8989
Close();
9090
}
9191
}

0 commit comments

Comments
 (0)