From 26b6fb2955c57cac923ea1a45a90775f7f0987d2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Dec 2026 09:59:52 +0100 Subject: [PATCH] thing-core: use ThemeToken in session overlay paint --- crates/thing-core/src/input/session.rs | 12 +++++------- crates/thing-core/tests/session_overlay.rs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/thing-core/src/input/session.rs b/crates/thing-core/src/input/session.rs index 657d21e..a863e5f 100644 --- a/crates/thing-core/src/input/session.rs +++ b/crates/thing-core/src/input/session.rs @@ -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, diff --git a/crates/thing-core/tests/session_overlay.rs b/crates/thing-core/tests/session_overlay.rs index 4a0918e..12f4ccb 100644 --- a/crates/thing-core/tests/session_overlay.rs +++ b/crates/thing-core/tests/session_overlay.rs @@ -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, },