fix max-height overflow on input long text

This commit is contained in:
yggverse 2025-11-07 19:44:53 +02:00
parent e123c1c1cd
commit 4905d55e8a
2 changed files with 16 additions and 2 deletions

View file

@ -52,7 +52,13 @@ impl Response for Box {
.build();
g_box.append(&title);
g_box.append(&text_view);
g_box.append(
&gtk::ScrolledWindow::builder()
.child(&text_view)
.max_content_height(320)
.propagate_natural_height(true)
.build(),
);
g_box.append(&control.g_box);
// Init events

View file

@ -35,7 +35,15 @@ impl Titan for gtk::Box {
.show_border(false)
.build();
notebook.append_page(&text.text_view, Some(&Label::tab("Text")));
notebook.append_page(
&gtk::ScrolledWindow::builder()
.child(&text.text_view)
.max_content_height(320)
.propagate_natural_height(true)
.build(),
Some(&Label::tab("Text")),
);
notebook.append_page(&file.button, Some(&Label::tab("File")));
notebook.connect_switch_page({