thing-core: use ThemeToken in session overlay paint

This commit is contained in:
Meta Vens 2026-12-06 09:59:52 +01:00
commit 26b6fb2955
2 changed files with 6 additions and 8 deletions

View file

@ -4,9 +4,9 @@
use thing_contract::{
Anchor, AnchorNode, BoolLiteral, BoolSource, Border, BoxNode, BoxStyle, ColorRef, CommandRef,
ContentAlign, Dimension, Direction, Edges, ItemAlign, Node, NodeCommon, NodeId, Overflow,
OverlayNode, Paint, ParamName, Position, Role, Scalar, Size2, TextLiteral, TextNode,
TextSource, TokenName, Wrap,
ContentAlign, Dimension, Direction, Display, Edges, ItemAlign, Node, NodeCommon, NodeId,
Overflow, OverlayNode, Paint, ParamName, Position, Role, Scalar, Size2, TextLiteral, TextNode,
TextSource, ThemeToken, Wrap,
};
use crate::layout::LaidTree;
@ -74,8 +74,6 @@ fn column_style(size: Size2, min_size: Size2, position: Position, inset: Edges,
}
}
use thing_contract::Display;
impl SessionOverlay {
/// Construct a Select chooser overlay for `owner` with `(value, label)` options.
#[cfg(test)]
@ -142,8 +140,8 @@ impl SessionOverlay {
Overflow::Scroll,
),
paint: Paint {
background: Some(ColorRef::Token(TokenName { name: "thing.surface".into() })),
border: Some(Border { color: ColorRef::Token(TokenName { name: "thing.control.border".into() }), width: 1.0 }),
background: Some(ColorRef::Token(ThemeToken { name: "thing.surface".into() })),
border: Some(Border { color: ColorRef::Token(ThemeToken { name: "thing.control.border".into() }), width: 1.0 }),
radius: 0.0,
},
role: Role::List,

View file

@ -77,7 +77,7 @@ fn test_overlay(owner: &str, scroll_id: &str, row_id: &str, text_id: &str) -> (O
..style()
},
paint: Paint {
background: Some(ColorRef::Token(TokenName { name: "thing.surface".into() })),
background: Some(ColorRef::Token(ThemeToken { name: "thing.surface".into() })),
border: None,
radius: 0.0,
},