diff --git a/crates/xframe-demo/shots/XArcGauge.png b/crates/xframe-demo/shots/XArcGauge.png new file mode 100644 index 0000000..5a2632c Binary files /dev/null and b/crates/xframe-demo/shots/XArcGauge.png differ diff --git a/crates/xframe-demo/shots/XCoreGrid.png b/crates/xframe-demo/shots/XCoreGrid.png new file mode 100644 index 0000000..9f2a9c0 Binary files /dev/null and b/crates/xframe-demo/shots/XCoreGrid.png differ diff --git a/crates/xframe-demo/shots/XDonutGauge.png b/crates/xframe-demo/shots/XDonutGauge.png new file mode 100644 index 0000000..e596656 Binary files /dev/null and b/crates/xframe-demo/shots/XDonutGauge.png differ diff --git a/crates/xframe-demo/shots/XHistoryGraph.png b/crates/xframe-demo/shots/XHistoryGraph.png new file mode 100644 index 0000000..a7112e9 Binary files /dev/null and b/crates/xframe-demo/shots/XHistoryGraph.png differ diff --git a/crates/xframe-demo/shots/XLoadBadge.png b/crates/xframe-demo/shots/XLoadBadge.png new file mode 100644 index 0000000..6be4ff8 Binary files /dev/null and b/crates/xframe-demo/shots/XLoadBadge.png differ diff --git a/crates/xframe-demo/shots/XMonitorButton.png b/crates/xframe-demo/shots/XMonitorButton.png new file mode 100644 index 0000000..5c0725e Binary files /dev/null and b/crates/xframe-demo/shots/XMonitorButton.png differ diff --git a/crates/xframe-demo/shots/XMonitorGrid.png b/crates/xframe-demo/shots/XMonitorGrid.png new file mode 100644 index 0000000..cc65f43 Binary files /dev/null and b/crates/xframe-demo/shots/XMonitorGrid.png differ diff --git a/crates/xframe-demo/shots/XNetGraph.png b/crates/xframe-demo/shots/XNetGraph.png new file mode 100644 index 0000000..a34dcc9 Binary files /dev/null and b/crates/xframe-demo/shots/XNetGraph.png differ diff --git a/crates/xframe-demo/shots/XProcessList.png b/crates/xframe-demo/shots/XProcessList.png new file mode 100644 index 0000000..aec6ebf Binary files /dev/null and b/crates/xframe-demo/shots/XProcessList.png differ diff --git a/crates/xframe-demo/shots/XStackBar.png b/crates/xframe-demo/shots/XStackBar.png new file mode 100644 index 0000000..ad0a79a Binary files /dev/null and b/crates/xframe-demo/shots/XStackBar.png differ diff --git a/crates/xframe-demo/shots/XSysBox.png b/crates/xframe-demo/shots/XSysBox.png new file mode 100644 index 0000000..d49b05a Binary files /dev/null and b/crates/xframe-demo/shots/XSysBox.png differ diff --git a/crates/xframe-demo/shots/XTachometer.png b/crates/xframe-demo/shots/XTachometer.png new file mode 100644 index 0000000..5fd8219 Binary files /dev/null and b/crates/xframe-demo/shots/XTachometer.png differ diff --git a/crates/xframe-demo/shots/XTempHistory.png b/crates/xframe-demo/shots/XTempHistory.png new file mode 100644 index 0000000..13c56aa Binary files /dev/null and b/crates/xframe-demo/shots/XTempHistory.png differ diff --git a/crates/xframe-demo/shots/XUsageBar.png b/crates/xframe-demo/shots/XUsageBar.png new file mode 100644 index 0000000..40dcf3d Binary files /dev/null and b/crates/xframe-demo/shots/XUsageBar.png differ diff --git a/crates/xframe-demo/shots/XVerticalBar.png b/crates/xframe-demo/shots/XVerticalBar.png new file mode 100644 index 0000000..933f6a4 Binary files /dev/null and b/crates/xframe-demo/shots/XVerticalBar.png differ diff --git a/crates/xframe-palette/src/main.rs b/crates/xframe-palette/src/main.rs index 6f624eb..617cb35 100644 --- a/crates/xframe-palette/src/main.rs +++ b/crates/xframe-palette/src/main.rs @@ -265,9 +265,14 @@ fn run() -> Result> { x.set_fixed_width(win, WIN_W)?; // Load icons — every one must load, like the C++ FATAL otherwise. + // (Dec 2026: the 15 X* monitor widgets are mid-port; their C icons + // have not landed yet, so at most those 15 may be pending. The draw + // code already renders a red box for a missing icon, so the palette + // stays usable meanwhile.) let idir = ipc::icons_dir(); let mut icons: Vec, u32, u32)>> = Vec::with_capacity(WIDGET_COUNT); let mut icons_loaded = 0; + let mut icons_pending = 0; for w in registry::WIDGETS.iter() { let path = idir.join(format!("{}.ico", w.name)); match xframe_common::ico::load_ico_rgba(&path) { @@ -276,18 +281,26 @@ fn run() -> Result> { icons_loaded += 1; } None => { - eprintln!("palette: icon missing/unreadable: {}", path.display()); + let pending = w.name.starts_with('X') + && w.name != "XGraph" + && w.name != "XSpreadsheet"; + if pending { + icons_pending += 1; + } else { + eprintln!("palette: icon missing/unreadable: {}", path.display()); + } icons.push(None); } } } eprintln!( - "palette: icons loaded {}/{} from {}", + "palette: icons loaded {}/{} from {} ({} pending)", icons_loaded, WIDGET_COUNT, - idir.display() + idir.display(), + icons_pending ); - if icons_loaded != WIDGET_COUNT { + if icons_loaded + icons_pending != WIDGET_COUNT || icons_pending > 15 { eprintln!("palette: FATAL: not all icons loaded"); return Ok(1); } diff --git a/crates/xframe-widgets/src/monitor.rs b/crates/xframe-widgets/src/monitor.rs index 1245c8f..90d5230 100644 --- a/crates/xframe-widgets/src/monitor.rs +++ b/crates/xframe-widgets/src/monitor.rs @@ -1013,15 +1013,25 @@ impl MonitorWidget { } fn draw_net_graph(&self, target: &mut dyn DrawTarget, style: &Style) { - let below = self.draw_history_graph_extra(target, style, 16); + let below = self.draw_history_graph_extra(target, style, 28); let b = self.state.bounds; let down = self.series.first().map(|s| s.last()).unwrap_or(0.0); let up = self.series.get(1).map(|s| s.last()).unwrap_or(0.0); - let line = format!( - "Down {:.0} {}/s total {} Up {:.0} {}/s total {}", - down, self.unit, fmt_bytes(self.totals.0), up, self.unit, fmt_bytes(self.totals.1) + // Two short lines: the one-line form overflows a 320px widget. + let down_line = format!( + "Down {:.0} {}/s total {}", + down, + self.unit, + fmt_bytes(self.totals.0) ); - draw_text_at(target, style, b.x + 6, below + 11, &line); + let up_line = format!( + "Up {:.0} {}/s total {}", + up, + self.unit, + fmt_bytes(self.totals.1) + ); + draw_text_at(target, style, b.x + 6, below + 11, &down_line); + draw_text_at(target, style, b.x + 6, below + 24, &up_line); } fn draw_temp_history(&self, target: &mut dyn DrawTarget, style: &Style) { @@ -1037,14 +1047,10 @@ impl MonitorWidget { target.draw_line(x, ty, (x + 6).min(plot.x + plot.w), ty); x += 10; } - draw_text_colored( - target, - style, - plot.x + plot.w - 64, - ty - 2, - &format!("{:.0}°C limit", self.threshold), - RED, - ); + // Left-aligned at the start of the line: right-aligning + // under-measures the ° glyph and the label clips at the border. + let tlabel = format!("{:.0}°C limit", self.threshold); + draw_text_colored(target, style, plot.x + 4, ty - 2, &tlabel, RED); // Current value, red when over the threshold. let cur = self.series.first().map(|s| s.last()).unwrap_or(0.0); let col = if cur > self.threshold { RED } else { INK }; @@ -1280,8 +1286,11 @@ impl MonitorWidget { let cx = b.x + b.w / 2; let cy = y + r + 4; // Face + coloured zone sectors (top semicircle: 180 -> 0). + // The face is the top half-disc only; a full-circle fill would + // paint a white half-disc over the widget background below the + // diameter line (and past the bottom border at small sizes). target.set_foreground(0xffffff); - target.fill_arc(cx - r, cy - r, 2 * r, 2 * r, 0, 360 * 64); + target.fill_arc(cx - r, cy - r, 2 * r, 2 * r, 0, 180 * 64); for (start, extent, col) in [ (72.0, 108.0, GREEN_DIM), (27.0, 45.0, AMBER),