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>
20 lines
419 B
C#
20 lines
419 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace LANCommander.Launcher.Views;
|
|
|
|
public partial class ServerSelectionView : UserControl
|
|
{
|
|
public ServerSelectionView()
|
|
{
|
|
InitializeComponent();
|
|
Loaded += OnLoaded;
|
|
}
|
|
|
|
private void OnLoaded(object? sender, RoutedEventArgs e)
|
|
{
|
|
ViewBackground.Apply(BackgroundImage);
|
|
|
|
ServerAddressTextBox.Focus();
|
|
}
|
|
}
|