wgui: windowing: close_if_clicked_outside support, context menus

This commit is contained in:
Aleksander
2026-01-06 00:06:06 +01:00
parent 1d78da16ab
commit a196dd9b3a
13 changed files with 541 additions and 223 deletions

View File

@@ -102,7 +102,7 @@ pub fn parse_component_button<'a>(
}
}
let (widget, component) = button::construct(
let (widget, button) = button::construct(
&mut ctx.get_construct_essentials(parent_id),
button::Params {
color,
@@ -124,7 +124,7 @@ pub fn parse_component_button<'a>(
},
)?;
process_component(ctx, Component(component), widget.id, attribs);
process_component(ctx, Component(button), widget.id, attribs);
parse_children(file, ctx, node, widget.id)?;
Ok(widget.id)

View File

@@ -809,7 +809,7 @@ fn parse_tag_macro(file: &ParserFile, ctx: &mut ParserContext, node: roxmltree::
}
let Some(name) = macro_name else {
log::error!("Template name not specified, ignoring");
log::error!("Macro name not specified, ignoring");
return;
};
@@ -1160,7 +1160,6 @@ fn parse_document_root(
.ok_or_else(|| anyhow::anyhow!("layout node not found"))?;
for child_node in node_layout.children() {
#[allow(clippy::single_match)]
match child_node.tag_name().name() {
/* topmost include directly in <layout> */
"include" => parse_tag_include(file, ctx, parent_id, &raw_attribs(&child_node))?,