When I resize a window, the zone which is painted by Avalonia does not properly fit the window borders. Also, maximizing and restoring the window size does not entails proper repainting.
To Reproduce
Use the default Avaliona MVVM project
I tweaked it by removing the reference to ReactiveUI, and adding a second label, but this may not be relevant. The XAML code for the main window is this:
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Avalonia_test.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Avalonia_test.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
Title="Avalonia_test">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<vm:MainWindowViewModel/>
</Design.DataContext>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center"/>
<TextBlock Text="Youpi" HorizontalAlignment="Center"/>
</StackPanel>
</Window>
When I run this and resize the window, the painted zone is not correct. In the example below I dragged a window corner to change the height and a row or two of transparent pixels appeared at the top :
Maximizing the window then leaves a blank area of the previous size, and the rest of the window is transparent:
Then if I restore the window to its normal size, it's fully transparent...
... and finally if I resize the window it is repainted (and as you can see, while this time i changed the width, there is a column of un-drawn pixels again, on the right side):
Expected behavior
The windows should be repainted after each size modification to fill the available windows area.
Screenshots
I posted my screenshots above as reproduction steps
Desktop (please complete the following information):
OS: Fedora 36. uname -a yields (host name removed) : Linux (hostname redacted) 6.2.14-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 1 00:54:35 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Desktop: Plasma
Avalonia version: 0.10.19 (this is what NuGet ships by default today)
Describe the bug
When I resize a window, the zone which is painted by Avalonia does not properly fit the window borders. Also, maximizing and restoring the window size does not entails proper repainting.
To Reproduce
When I run this and resize the window, the painted zone is not correct. In the example below I dragged a window corner to change the height and a row or two of transparent pixels appeared at the top :
Maximizing the window then leaves a blank area of the previous size, and the rest of the window is transparent:
Then if I restore the window to its normal size, it's fully transparent...
... and finally if I resize the window it is repainted (and as you can see, while this time i changed the width, there is a column of un-drawn pixels again, on the right side):
Expected behavior
The windows should be repainted after each size modification to fill the available windows area.
Screenshots
I posted my screenshots above as reproduction steps
Desktop (please complete the following information):
uname -a
yields (host name removed) :Linux (hostname redacted) 6.2.14-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 1 00:54:35 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
glxinfo
output : glxinfo.txtAdditional context
-