LANCommander/LANCommander.Launcher/Views/ServerSelectionView.axaml.cs
Pat Hartl 860db8ff8f Make launcher view backgrounds deterministic in visual tests
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>
2026-06-24 02:03:09 -05:00

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();
}
}