Skip to content

Commit

Permalink
PreferencesWindow: Minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1jaczyyy committed Sep 1, 2019
1 parent bdcfee9 commit 6cb001c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Apollo/Windows/PreferencesWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void Unloaded(object sender, EventArgs e) {
fade.Dispose();
}

void MoveWindow(object sender, PointerPressedEventArgs e) => BeginMoveDrag();

void AlwaysOnTop_Changed(object sender, EventArgs e) {
Preferences.AlwaysOnTop = AlwaysOnTop.IsChecked.Value;
Activate();
Expand Down Expand Up @@ -319,6 +317,10 @@ async void Window_KeyDown(object sender, KeyEventArgs e) {
Program.Project?.Undo.HandleKey(e);
}

void MoveWindow(object sender, PointerPressedEventArgs e) => BeginMoveDrag();

void Minimize() => WindowState = WindowState.Minimized;

public static void Create(Window owner) {
if (Preferences.Window == null) {
Preferences.Window = new PreferencesWindow() {Owner = owner};
Expand Down
5 changes: 4 additions & 1 deletion Apollo/Windows/PreferencesWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
<TextBlock Margin="0 7" HorizontalAlignment="Center" VerticalAlignment="Center" Text=" " Opacity="0" />
</Grid>

<Components:Close Grid.Column="1" Margin="5 5" Clicked="Close" />
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="5 5" Spacing="5">
<Components:Minimize Clicked="Minimize" />
<Components:Close Clicked="Close" />
</StackPanel>
</Grid>

<Grid Grid.Row="0">
Expand Down

0 comments on commit 6cb001c

Please sign in to comment.