From eeae110321b72b11644a67906ba541e6fe1f410d Mon Sep 17 00:00:00 2001 From: obrusvit Date: Tue, 11 Feb 2025 12:23:09 +0100 Subject: [PATCH] feat(core): add color op to FormattedText [no changelog] --- core/embed/rust/src/ui/component/text/op.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/embed/rust/src/ui/component/text/op.rs b/core/embed/rust/src/ui/component/text/op.rs index 39e30ad395..23c705e9c8 100644 --- a/core/embed/rust/src/ui/component/text/op.rs +++ b/core/embed/rust/src/ui/component/text/op.rs @@ -204,6 +204,10 @@ impl<'a> OpTextLayout<'a> { self.with_new_item(Op::Text(text.into(), font, false)) } + pub fn color(self, color: Color) -> Self { + self.with_new_item(Op::Color(color)) + } + pub fn newline(self) -> Self { let font = self.layout.style.text_font; self.text("\n", font)