T12d Data Display: QrCode, Barcode, Meter, Gauge, UsageBar, Stars, Comparison (review pending: codex 401)

This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 19:18:10 -04:00
1 parent 8798d95d7a
commit f41faf5684
18 files changed
+1161 -46

No files matched your search

+6
View File
@@ -101,6 +101,8 @@ mixable!(
shadow: Hsla,
tooltip_bg: Hsla,
tooltip_fg: Hsla,
paper: Hsla,
ink: Hsla,
chart: [Hsla; 8],
ansi: [Hsla; 16],
syntax: Syntax,
@@ -151,6 +153,8 @@ impl Palette {
shadow: c(0x181613),
tooltip_bg: c(0x181613),
tooltip_fg: c(0xfcfaf7),
paper: c(0xffffff),
ink: c(0x181613),
chart: c8([
0x5182c1, 0x009589, 0xaa732b, 0xb8636b, 0x8572bb, 0x539156, 0xb66946, 0x138db1,
]),
@@ -218,6 +222,8 @@ impl Palette {
shadow: c(0x000000),
tooltip_bg: c(0x373533),
tooltip_fg: c(0xf3f1f0),
paper: c(0xf3f1f0),
ink: c(0x181613),
chart: c8([
0x79a7e2, 0x4eb9ad, 0xcd995c, 0xdc8a90, 0xa998dd, 0x7cb57d, 0xd9906f, 0x56b2d4,
]),
+24
View File
@@ -284,6 +284,30 @@ impl Theme {
px_to_rems(128.0)
}
/// A QR code's tile.
pub fn qr_code(&self) -> Rems {
px_to_rems(160.0)
}
/// The narrowest bar of a barcode; the others are whole multiples.
pub fn barcode_module(&self) -> Rems {
px_to_rems(2.0)
}
pub fn barcode_height(&self) -> Rems {
px_to_rems(56.0)
}
/// A gauge's dial.
pub fn gauge(&self) -> Rems {
px_to_rems(144.0)
}
/// The track of a meter or a usage bar.
pub fn meter_track(&self) -> Rems {
px_to_rems(6.0)
}
/// One repeat of a watermark's text.
pub fn watermark_tile(&self) -> Size<Rems> {
size(px_to_rems(200.0), px_to_rems(96.0))