Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions OpenUtau.Core/Util/WindowSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ public bool TryGetPosition(out int x, out int y) {
}

public void Set(double width, double height, int posX, int posY, int state) {
Width = width;
Height = height;
if (state == 0) { // When WindowState is Normal
Width = width;
Height = height;
}
PositionX = posX;
PositionY = posY;
State = state == 1 ? 0 : state; // Ignore minimized state
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</Menu>
<Carousel SelectedIndex="{Binding Page}" >
<!--Welcome page-->
<Grid Margin="60,50,60,40" RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="*,*">
<Grid Margin="60,50,60,40" RowDefinitions="Auto,Auto,Auto,*" ColumnDefinitions="*,*">
<!--Startup warnings-->
<StackPanel Grid.Row="0" Grid.ColumnSpan="2">
<Button Click="OnWelcomeRecovery" Height="40" Content="{Binding RecoveryString}"
Expand Down
4 changes: 1 addition & 3 deletions OpenUtau/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,9 +1461,7 @@ public void WindowClosing(object? sender, WindowClosingEventArgs e) {
PathManager.Inst.ClearCache();
Log.Information("Cache cleared.");
}
if (WindowState != WindowState.Maximized) {
Preferences.Default.MainWindowSize.Set(Width, Height, Position.X, Position.Y, (int)WindowState);
}
Preferences.Default.MainWindowSize.Set(Width, Height, Position.X, Position.Y, (int)WindowState);
Preferences.Default.RecoveryPath = string.Empty;
Preferences.Save();
return;
Expand Down
4 changes: 1 addition & 3 deletions OpenUtau/Views/PianoRollWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ public void WindowDeactivated(object sender, EventArgs args) {
}

void WindowClosing(object? sender, WindowClosingEventArgs e) {
if (WindowState != WindowState.Maximized) {
Preferences.Default.PianorollWindowSize.Set(Width, Height, Position.X, Position.Y, (int)WindowState);
}
Preferences.Default.PianorollWindowSize.Set(Width, Height, Position.X, Position.Y, (int)WindowState);
Hide();
e.Cancel = true;
}
Expand Down
Loading