7 Commits
Author SHA1 Message Date
JMR-devandCopilot 73a81138a7 Add plot legend with floating top-right overlay
Renders a small panel inside the plot showing each visible series as [color swatch] [sensor title] [latest value + unit]. Panel width fits the longest sensor name and redraws when sensors are added or removed from the plot (RefreshPlotSeries already fires PlotInvalidated). Falls back to ellipsizing only if the label column would push the panel past the plot bounds. Capped at 12 rows with a +N more footer; auto-hides when plot pane is narrower than 200px. Theme-aware translucent background + border match the plot frame.

Persisted as showPlotLegend (default true) and toggleable from View menu and plot context menu. The View menu item is hidden when ShowPlot is off, but the setting itself is preserved across plot enable/disable and app restarts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 14:26:11 -05:00
JMR-devandCopilot ac65b63a8f Adopt Fluent/Mica look for light mode
Replaces WinUI 2 grey brushes with WinUI 3 equivalents and enables the Mica system backdrop on Windows 11. RootGrid is transparent when Mica is active so the material shows through; falls back to ApplicationPageBackgroundThemeBrush on Win10. Sensor header uses LayerFillColorDefaultBrush; plot pane border uses DividerStrokeColorDefaultBrush. Black theme keeps a solid background and disables Mica.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 14:01:58 -05:00
JMR-devandCopilot 35f730c89a Host PlotView in MainWindow.xaml (Phase 5b step 5)
PlotView now has a parameterless ctor + AttachViewModel(vm) so it can be instantiated by the XAML loader. The context flyout is built lazily in AttachViewModel since it captures live ViewModel state. Class is now public sealed (XAML codegen requirement). MainWindow's BuildPlotPane is gone; the plot pane (toolbar + <controls:PlotView x:Name=PlotControl/>) lives in XAML and the ctor just calls PlotControl.AttachViewModel(ViewModel).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 13:36:20 -05:00
JMR-devandCopilot fd55a89e22 Convert sensor pane scaffold and TreeView to MainWindow.xaml (Phase 5b step 4)
Declare the sensor pane (SensorPane), header host (SensorHeaderHost), and TreeView (SensorTree, with its ContentPresenter DataTemplate and SelectionChanged handler) in XAML. The measurer-managed header grid and the per-row CreateSensorRow content remain imperative since they involve dynamic column-width pushing and per-item context flyouts/double-tap handlers; this is the hybrid fallback called out in the Phase 5b plan.

Drop _sensorTree/_sensorPane fields; replace BuildSensorPane with a small PopulateSensorHeader and delete the old XamlReader-loaded DataTemplate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 13:31:24 -05:00
JMR-devandCopilot c6ef3edeff Convert MenuBar to MainWindow.xaml (Phase 5b step 3)
Declare File/View/Options/Help menus and their toggle items in XAML with x:Bind (TwoWay) to ViewModel properties. Radio/indexed submenus (Temperature Unit, Plot Location, Theme, Stroke Thickness, File Rotation, Update Interval, Logging Interval, Sensor Values Time Window) are declared as named empty MenuFlyoutSubItems and populated by PopulateRadioSubMenu in code-behind so dynamic check-state and Tag-based selection are preserved.

Click handlers for non-toggle items (save report, reset, expand/collapse, web server dialogs, about, exit) live on the code-behind. Delete BuildMenuBar, CreateToggleItem, CreateToggleSettingItem, BuildRadioSubMenu, BuildIndexedSubMenu. CreateMenuItem is retained for the still-imperative sensor row context menu.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 13:28:34 -05:00
JMR-devandCopilot fa1b16a8f3 Move status text and loading overlay to MainWindow.xaml (Phase 5b step 2)
Express the status TextBlock and full loading overlay (ProgressRing + label) declaratively with x:Bind to ViewModel.StatusText and ViewModel.HardwareLoadingVisibility. Delete the imperative StatusHost population and BuildLoadingOverlay helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 13:25:55 -05:00
JMR-devandCopilot 0db7de801a Introduce MainWindow.xaml skeleton (Phase 5b step 1)
Make MainWindow partial and add a XAML skeleton with named hosts (MenuHost, ContentGrid, StatusHost, OverlayHost). Replace BuildRoot/AssignContent/ResolveControls with InitializeComponent plus imperative population of the named hosts; existing menu/sensor/plot/overlay builders are unchanged so later sub-steps can replace each region declaratively.

Bind OverlayHost.Visibility to HardwareLoadingVisibility so the empty host does not intercept hit-testing once loading completes. Builders that previously assigned via the brittle Children[] casting now use out params.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 13:24:30 -05:00