Extended splash screen does not render perfectly with the specified solid color
Current behavior
With Skia, the app starts with a white page then black page then the splashscreen color defined with <UnoSplashScreenColor>#00FF00</UnoSplashScreenColor>
With WinUI, the app starts with a black page then the splashscreen color defined with UnoSplashScreenColor, but the logo area will have a different fade in color.
2 videos (Skia and WinUI):
https://github.com/unoplatform/uno/assets/1608424/ca46556e-90f9-47dc-ab2a-09be367c44e6
https://github.com/unoplatform/uno/assets/1608424/5fe4cc1b-dd4e-4f27-b952-67d401456c16
Expected behavior
The color should be unique from the start to the end
How to reproduce it (as minimally and precisely as possible)
1- Create new project 2- Add <UnoSplashScreenColor>#00FF00</UnoSplashScreenColor> in the project file
Note: In ShellModel.cs in the start, I added a await Task.Delay(10000) with the goal to see the splashscreen longer, but it does not work, the navigations goes right away to the MainPage.
If you want to check the behavior, use a screen recorder and scroll manually.
Workaround
No response
Works on UWP/WinUI
None
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
No response
Affected platforms
Skia (WPF), Windows (WinAppSDK)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
@kazo0 FYI https://twitter.com/archiecoder/status/1788332275605627189
fyi @MartinZikmund, @Youssef1313, @dansiegel
This may also be resizetizer related
so to display the splashscreen for longer you can use:
protected async override void OnLaunched(LaunchActivatedEventArgs args)
...
#if false
Host = await builder.NavigateAsync<Shell>();
#else
var shell = new Shell();
if ((shell as IContentControlProvider)?.ContentControl is ExtendedSplashScreen ess)
{
ess.Source = new LoadingTask(Task.Delay(5000), shell);
}
MainWindow.Content = shell;
MainWindow.Activate();
#endif
now, regarding the issue of seeing inconsistent colors:
the splashscreen for windows & skia-desktop is created with ExtendedSplashScreen::GetNativeSplashScreen() https://github.com/unoplatform/uno.toolkit.ui/blob/6.0.0/src/Uno.Toolkit.UI/Controls/ExtendedSplashScreen/ExtendedSplashScreen.Windows.crossruntime.cs where, in essence, you have a logo-image with background wrapped in a grid with background. ____^ fixme: partially incorrect here?
the splash-screen also has a fade-out effect that just animates the opacities: https://github.com/unoplatform/uno.toolkit.ui/blob/6.0.0/src/Uno.Toolkit.UI/Controls/ExtendedSplashScreen/ExtendedSplashScreen.xaml#L39-L58 note the duration is only for 0.083s, so it could be very-hard/impossible to notice on non-windows targets.
if you recall the double background from just before, well that does not play well with opacity... as this xaml can illustrates:
<Border Opacity="0.5" Background="Pink" Height="100" Width="100">
<Border Background="Pink" Height="50" Width="50" />
</Border>