diff options
| author | Joe Carstairs <me@joeac.net> | 2026-02-12 10:18:42 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-02-12 10:18:42 +0000 |
| commit | 8659e9df22908fb10afb8d949a523d347634e637 (patch) | |
| tree | ed7914a8dd28f99cc9fcd6baf8778a5bf8e48e00 /schist_desktop_gui/src/gui/components/text.rs | |
| parent | b1988df5603a427994371d8176bce0c6c1f06fc2 (diff) | |
task-085: table contents are small text size
Diffstat (limited to 'schist_desktop_gui/src/gui/components/text.rs')
| -rw-r--r-- | schist_desktop_gui/src/gui/components/text.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/schist_desktop_gui/src/gui/components/text.rs b/schist_desktop_gui/src/gui/components/text.rs index b67a7aa..36a6a13 100644 --- a/schist_desktop_gui/src/gui/components/text.rs +++ b/schist_desktop_gui/src/gui/components/text.rs @@ -35,6 +35,7 @@ enum Strength { #[derive(Clone, Debug, PartialEq)] enum Size { VSmall, + Small, Base, } @@ -74,6 +75,13 @@ impl Text { } } + pub fn small(&self) -> Self { + Self { + size: Some(Size::Small), + ..self.clone() + } + } + pub fn danger(&self) -> Self { Self { colour: Some(Colour::Danger), @@ -133,6 +141,7 @@ where iced::widget::text(text.borrow().content.clone()) .size(match text.borrow().size { Some(Size::VSmall) => TEXT_SIZE_V_SM, + Some(Size::Small) => TEXT_SIZE_SM, Some(Size::Base) | None => TEXT_SIZE_BASE, }) .align_x(match &text.borrow().align { |
