fix(blackbox): the timeline's labels on a narrow timeline, marks out of view, the cab on a short window

- The hover label and the clock bubble keep to the left edge on a
  narrow timeline instead of throwing in Render.
- A mark is told under the pointer only when it is drawn: within the
  plot and the time shown.
- The device groups are clipped at their own width, not 4 px short.
- On a short window the cab card scrolls, so the list above it keeps
  room for a few rows.
This commit is contained in:
maj00r
2026-11-11 01:50:40 +01:00
parent 9ee059bc16
commit 4dcfd1c4e3
3 changed files with 10 additions and 5 deletions

View File

@@ -174,9 +174,11 @@ public sealed class BlackBoxWindow : Window
DockPanel.SetDock(_tabs, Dock.Top);
side.Children.Add(_tabs);
side.Children.Add(new Panel { Children = { _events, _timetableScroll, _summaryScroll } });
var cabCard = UiKit.Group(_strings["Cab"], _cab);
var cabCard = UiKit.Group(_strings["Cab"], new ScrollViewer { Content = _cab, HorizontalScrollBarVisibility = Avalonia.Controls.Primitives.ScrollBarVisibility.Disabled });
cabCard.Margin = new Thickness(0, UiKit.Gap, 0, 0);
var sideColumn = new DockPanel();
// On a short window the cab scrolls, so the list above keeps room for a few rows.
sideColumn.SizeChanged += (_, e) => cabCard.MaxHeight = Math.Max(160, e.NewSize.Height - 200);
DockPanel.SetDock(cabCard, Dock.Bottom);
sideColumn.Children.Add(cabCard);
sideColumn.Children.Add(UiKit.Frame(side));