wgui: interactable components, rename TextLabel -> WidgetLabel

This commit is contained in:
Aleksander
2025-08-10 11:46:01 +02:00
parent 91e584383f
commit 93a3fee349
26 changed files with 294 additions and 174 deletions

View File

@@ -7,7 +7,7 @@ use regex::Regex;
use wgui::{
event::{self, EventListenerKind},
i18n::Translation,
widget::text::TextLabel,
widget::label::WidgetLabel,
};
use crate::{
@@ -46,7 +46,7 @@ where
.layout
.state
.widgets
.get_as::<TextLabel>(*widget_id)
.get_as::<WidgetLabel>(*widget_id)
.unwrap();
let format = match role {
@@ -165,6 +165,6 @@ fn clock_on_tick(
|tz| format!("{}", Local::now().with_timezone(tz).format(&clock.format)),
);
let label = data.obj.get_as_mut::<TextLabel>();
let label = data.obj.get_as_mut::<WidgetLabel>();
label.set_text(&mut common.i18n(), Translation::from_raw_text(&date_time));
}