mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 03:52:45 +01:00
Use the theme ink in the text cache trial
This commit is contained in:
1 parent
5b556d052e
commit
1ed5bd9f11
1 file changed
+6
-1
@@ -973,7 +973,12 @@ pub(crate) mod memo_tests {
|
||||
Appearance { mode: Mode::Dark, contrast: Contrast::Standard, size: Size::Compact, text_size: TextSize::Small, reduced_motion: false };
|
||||
let tokens = UiTokens::new(Arc::new(resolve(&builtins()[0], appearance, None).tokens), Contrast::Standard, Size::Compact);
|
||||
let ctx = Context::default();
|
||||
let env = TextEnv { tokens: &tokens, direction: Direction::Ltr, ink: egui::Color32::WHITE, fonts: StackFacts::default() };
|
||||
let env = TextEnv {
|
||||
tokens: &tokens,
|
||||
direction: Direction::Ltr,
|
||||
ink: crate::style::rgba_color(tokens.tokens().color.text.normal),
|
||||
fonts: StackFacts::default(),
|
||||
};
|
||||
let run = TextRun::new("cached layout");
|
||||
let mut first = None;
|
||||
let mut output = ctx.run_pass(Default::default(), |ctx| first = Some(run.layout(ctx, &env, 100.0).galley));
|
||||
|
||||
Reference in new issue
Block a user