diff --git a/BitWallpaper/MainWindow.xaml.cs b/BitWallpaper/MainWindow.xaml.cs index b4d0133..7e35200 100644 --- a/BitWallpaper/MainWindow.xaml.cs +++ b/BitWallpaper/MainWindow.xaml.cs @@ -135,6 +135,8 @@ public void BringToForeground() _isSystemTray = false; + (this.DataContext as MainViewModel).MinMode = false; + } private void Window_SizeChanged(object sender, SizeChangedEventArgs e) @@ -325,7 +327,7 @@ private void Window_StateChanged(object sender, EventArgs e) _dispatcherMouseTimer.Stop(); - //BackgroundGrid.Margin = new Thickness(0); + MarginGrid.Margin = new Thickness(0); } else if (this.WindowState == WindowState.Maximized) { @@ -334,7 +336,7 @@ private void Window_StateChanged(object sender, EventArgs e) _dispatcherMouseTimer.Start(); - //MarginGrid.Margin = new Thickness(3); + MarginGrid.Margin = new Thickness(8); } } @@ -346,11 +348,17 @@ private void CloseButton_Click(object sender, RoutedEventArgs e) private void MaxButton_Click(object sender, RoutedEventArgs e) { + + MarginGrid.Margin = new Thickness(8); + this.WindowState = WindowState.Maximized; } private void RestoreButton_Click(object sender, RoutedEventArgs e) { + + MarginGrid.Margin = new Thickness(0); + this.WindowState = WindowState.Normal; } @@ -391,9 +399,6 @@ private void ToggleSystemTrayMode() if (_isSystemTray) { BringToForeground(); - //_isSystemTray = false; - - (this.DataContext as MainViewModel).MinMode = false; } else { diff --git a/BitWallpaper/ViewModels/MainViewModel.cs b/BitWallpaper/ViewModels/MainViewModel.cs index 50e22ea..6205dec 100644 --- a/BitWallpaper/ViewModels/MainViewModel.cs +++ b/BitWallpaper/ViewModels/MainViewModel.cs @@ -7713,7 +7713,7 @@ private void LoadChart(Pairs pair, CandleTypes ct) // 期間設定 chartAxisX[0].MaxValue = span - 1; - //chartAxisX[0].MinValue = 0; + chartAxisX[0].MinValue = 0; // まとめて追加