Skip to content

Commit

Permalink
Use Bounds instead of Width and Height properties as they are "…
Browse files Browse the repository at this point in the history
…requested" size rather than actual size (see AvaloniaUI#18060)
  • Loading branch information
codecat committed Jan 30, 2025
1 parent cadf6aa commit 423339b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/IntegrationTestApp/ShowWindowTest.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void TimerOnTick(object? sender, EventArgs e)
_orderTextBox!.Text = MacOSIntegration.GetOrderedIndex(this).ToString();
}

private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width += 10;
private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height += 10;
private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width = Bounds.Width + 10;
private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height = Bounds.Height + 10;
}
}

0 comments on commit 423339b

Please sign in to comment.