LoginView, SplashView and ServerSelectionView each picked a random full-screen background on load, so the visual-regression baselines could never match — every run compared against a different photo and reported a spurious 82-94% regression. Centralize the selection in ViewBackground and let tests disable it, so captured screenshots and baselines are stable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
362 B
C#
18 lines
362 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace LANCommander.Launcher.Views;
|
|
|
|
public partial class SplashView : UserControl
|
|
{
|
|
public SplashView()
|
|
{
|
|
InitializeComponent();
|
|
Loaded += OnLoaded;
|
|
}
|
|
|
|
private void OnLoaded(object? sender, RoutedEventArgs e)
|
|
{
|
|
ViewBackground.Apply(BackgroundImage);
|
|
}
|
|
}
|