llr-cpp: Fix Dialog

This commit is contained in:
Olivier Goffart 2022-01-18 14:38:43 +01:00 committed by Simon Hausmann
parent 0259c0dc9b
commit 35cb9ed338

View file

@ -2275,10 +2275,9 @@ fn compile_expression(expr: &llr::Expression, ctx: &EvaluationContext) -> String
} }
_ => panic!("dialog layout unsorted cells not an array"), _ => panic!("dialog layout unsorted cells not an array"),
}; };
format!("sixtyfps::cbindgen_private::GridLayoutCellData {cv} [] = {{ {c} }};\ format!("sixtyfps::cbindgen_private::GridLayoutCellData {cv}_array [] = {{ {c} }};\
sixtyfps::cbindgen_private::DialogButtonRole roles[] = {{ {r} }};\ sixtyfps::cbindgen_private::sixtyfps_reorder_dialog_button_layout({cv}_array, {r});\
sixtyfps::cbindgen_private::sixtyfps_reorder_dialog_button_layout({cv}, {r});\ sixtyfps::Slice<sixtyfps::cbindgen_private::GridLayoutCellData> {cv} {{ std::data({cv}_array), std::size({cv}_array) }}",
",
r = compile_expression(roles, ctx), r = compile_expression(roles, ctx),
cv = cells_variable, cv = cells_variable,
c = cells.join(", "), c = cells.join(", "),