summaryrefslogtreecommitdiff
path: root/iced_builder/src/codegen
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-09-28 12:17:53 +0200
committerpml68 <contact@pml68.me>2024-09-28 12:22:27 +0200
commitb7e1527ab07acc45038f71c0a2bbbaf4180e5db3 (patch)
treebf76c314fcdc911993d299061f1559093a722832 /iced_builder/src/codegen
parentfeat: make code view scrollable, add autogen comment to code (diff)
downloadiced-builder-b7e1527ab07acc45038f71c0a2bbbaf4180e5db3.tar.gz
feat: add button to switch between designer and code view
f
Diffstat (limited to '')
-rw-r--r--iced_builder/src/codegen/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/iced_builder/src/codegen/mod.rs b/iced_builder/src/codegen/mod.rs
index 20a2e65..923ef99 100644
--- a/iced_builder/src/codegen/mod.rs
+++ b/iced_builder/src/codegen/mod.rs
@@ -138,7 +138,7 @@ impl RenderedElement {
Ok(rustfmt.format_str(app_code)?)
}
- pub fn test() -> String {
+ pub fn test() -> RenderedElement {
let mut text1 = RenderedElement::new(ElementName::Text("wow"));
text1.set_property("height", "120.5");
text1.set_property("width", "230");
@@ -154,6 +154,6 @@ impl RenderedElement {
],
));
- element.app_code("new app", None).unwrap()
+ element
}
}