mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 09:04:09 +01:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user