From e8cec0867e2af5627056010255220ddfa1477a22 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 4 Oct 2026 14:09:26 +0200 Subject: [PATCH] Let the consist panel shrink with the small thumbnails --- StarterNG/Views/Scenarios.axaml | 7 ++++--- StarterNG/Views/Scenarios.axaml.cs | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/StarterNG/Views/Scenarios.axaml b/StarterNG/Views/Scenarios.axaml index d19b930..8b809cd 100644 --- a/StarterNG/Views/Scenarios.axaml +++ b/StarterNG/Views/Scenarios.axaml @@ -7,7 +7,7 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="StarterNG.Views.Scenarios" x:CompileBindings="True"> - + @@ -15,8 +15,9 @@ - - + + + /// The floor of the consist row, so the small thumbnails do not sit in the + /// height the large ones need. + /// + private const double SmallConsistRowHeight = 84; + + private const double LargeConsistRowHeight = 120; + + private void SyncConsistRowHeight() => + scenariosGrid.RowDefinitions[1].MinHeight = AppServices.Current.Settings.LargeThumbnails + ? LargeConsistRowHeight + : SmallConsistRowHeight; + public void RefreshConsistView() { + SyncConsistRowHeight(); RefreshVehicleLabels(); if (AppServices.Current.State.CurrentTrainset is { } trainset) ShowConsist(trainset);