1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-24 05:12:02 +00:00

feat(core): add color op to FormattedText

[no changelog]
This commit is contained in:
obrusvit 2025-02-11 12:23:09 +01:00
parent eb027d2ffa
commit eeae110321

View File

@ -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)