Implement and archive Phase 5 form designer

This commit is contained in:
2026-09-06 20:19:57 +02:00
parent e3dc9028bf
commit ce97700a98
27 changed files with 3625 additions and 167 deletions

View File

@@ -147,15 +147,10 @@ impl App {
let v = self.project.view(view).unwrap();
let doc = self.project.document(v.document()).unwrap();
if self.mode == Mode::Designer
&& active
&& Some(v.document()) == self.designer.document
&& matches!(doc.content(), tb_vm::project_io::Content::Form(_))
{
put(
f,
inner,
"Formular · Designerwerkzeuge folgen in Change 05",
content_style,
);
self.design_render(f, inner);
} else {
let expansion = self.editor.expansions.get(&view);
let code = expansion.map(String::as_str).unwrap_or(doc.code());
@@ -334,6 +329,9 @@ impl App {
self.hits.push((r, Hit::ProjectMember(row)));
}
}
kind @ (WindowKind::Toolbox | WindowKind::Palette | WindowKind::MenuDesign) => {
self.design_tool_render(f, kind, inner)
}
WindowKind::Output => {
f.render_widget(tb_ui::screen::ScreenWidget(self.session.screen()), inner)
}
@@ -400,22 +398,27 @@ impl App {
);
}
if self.mode == Mode::Designer && self.properties {
let (left, geometry) = self.design_bar();
let width = (geometry.width() as u16 + 1).min(area.width);
put(
f,
Rect::new(0, 0, area.width, 1),
format!(
"Property: [Caption]↓ Value: […]↓ │ Spalte,Zeile │ BxH{}",
if self.value_focus {
" · Value aktiv"
} else {
""
}
),
Rect::new(0, 0, area.width - width, 1),
left,
style(self, 0),
);
put(
f,
Rect::new(area.width - width, 0, width, 1),
geometry,
style(self, 0),
);
self.hits.push((
Rect::new(0, 0, area.width, 1),
Hit::Command(Command::MenuBar),
Rect::new(0, 0, area.width / 2, 1),
Hit::DesignAction("property"),
));
self.hits.push((
Rect::new(area.width / 2, 0, area.width - area.width / 2, 1),
Hit::DesignAction("value"),
));
} else {
put(