Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
When we set the width of the button and run the project on a GTK platform, the button only start with 1 pixel.
The gray on the image is just to show the space of the Button
Works fine on wasm and Android, or the last previous version.
Expected behavior
That GTK display the Button like other platforms or the older versions.
How to reproduce it (as minimally and precisely as possible)
Remove the current Uno.Templates.
dotnet new uninstall Uno.Templates
Install the new Uno.Template
dotnet new install Uno.Templates
Create a new Blank project
dotnet new unoapp -preset blank -o MySampleButtonWidth
Set the GTK platform as the StartUp.
Open the file Directory.Packages.props
and replace all references to the "4.9.17" (or the "Uno.WinUI") version for 5.0.0-dev.1392 (or the last for now https://www.nuget.org/packages/Uno.WinUI/)
<PackageVersion Include="Uno.WinUI" Version="4.9.17" />
to
<PackageVersion Include="Uno.WinUI" Version="5.0.0-dev.1392" />
And update the Program.cs and remove the ", args" from the GktHost.
From
var host = new GtkHost(() => new AppHead(), args);
The VisualStateManager is just to show that the Button start with Width 1, but if we change for other value it works.
So pass the mouse over the start of the Gray area.
Current behavior
When we set the width of the button and run the project on a GTK platform, the button only start with 1 pixel.
The gray on the image is just to show the space of the Button
Works fine on wasm and Android, or the last previous version.
Expected behavior
That GTK display the Button like other platforms or the older versions.
How to reproduce it (as minimally and precisely as possible)
Remove the current Uno.Templates.
Install the new Uno.Template
Create a new Blank project
Set the GTK platform as the StartUp.
Open the file Directory.Packages.props and replace all references to the "4.9.17" (or the "Uno.WinUI") version for 5.0.0-dev.1392 (or the last for now https://www.nuget.org/packages/Uno.WinUI/)
And update the Program.cs and remove the ", args" from the GktHost.
From
To
And the file MainPage.xaml.cs
And rebuild the soluction and Run.
The VisualStateManager is just to show that the Button start with Width 1, but if we change for other value it works. So pass the mouse over the start of the Gray area.
Workaround
Use visua state for change the Width
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Affected platforms
Skia (GTK on Linux/macOS/Windows)
IDE
Visual Studio 2022
IDE version
Version 17.6.4 or Version 17.7.0 Preview 2.0
Relevant plugins
No response
Anything else we need to know?
No response