fix scaling, refactors

This commit is contained in:
galister
2025-06-26 04:22:40 +09:00
parent fc294e6f9a
commit 1215a50324
7 changed files with 28 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ pub fn create_anchor<O>(app: &mut AppState) -> anyhow::Result<OverlayData<O>>
where
O: Default,
{
let panel = GuiPanel::new_from_template(app, "gui/anchor.xml")?;
let (panel, _) = GuiPanel::new_from_template(app, "gui/anchor.xml")?;
Ok(OverlayData {
state: OverlayState {

View File

@@ -20,7 +20,13 @@ pub fn create_watch<O>(app: &mut AppState) -> anyhow::Result<OverlayData<O>>
where
O: Default,
{
let mut panel = GuiPanel::new_blank(app)?;
let (mut panel, parser) = GuiPanel::new_from_template(app, "gui/watch.xml")?;
for (id, widget) in parser.ids.iter() {
if id.starts_with("clock") {}
}
if let Ok(clock) = parser.require_by_id("clock0") {}
let (_, _) = panel.layout.add_child(
panel.layout.root_widget,