formatting tags

This commit is contained in:
2026-05-25 12:23:32 +03:00
parent 3c27238b72
commit 8e18e82202
6 changed files with 374 additions and 95 deletions
+8 -1
View File
@@ -172,11 +172,12 @@ impl RepetitionState {
"value" => self.draw_value(word),
"speech" => self.draw_voice(),
"reading" => self.draw_reading(word),
"context" => self.draw_context(word),
_ => space().into(),
})
}
col.spacing(DEFAULT_SPACING).into()
col.spacing(DEFAULT_SPACING).align_x(Center).into()
}
fn answer_bar(&self) -> Element<'_, RepetitionMessage> {
@@ -218,6 +219,12 @@ impl RepetitionState {
Some(reading) => text!("{}", reading).size(24).into(),
}
}
fn draw_context(&self, word: &WordData) -> Element<'_, RepetitionMessage> {
match word.additional.get("context") {
None => space().into(),
Some(context) => text!("{}", context).size(24).into(),
}
}
}
impl KeyPressedPage for RepetitionState {