summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f5cb19e..e97a9fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -190,20 +190,27 @@ impl AsyncComponent for PostComposerModel {
                         },
 
                         #[name = "content_textarea"]
-                        gtk::TextView {
-                            set_buffer: Some(&model.content_buffer),
-                            set_hexpand: true,
+                        gtk::ScrolledWindow {
                             set_vexpand: true,
-                            set_css_classes: &["frame", "view"],
-                            set_monospace: true,
-                            set_left_margin: 8,
-                            set_right_margin: 8,
-                            set_top_margin: 8,
-                            set_bottom_margin: 8,
 
-                            #[track = "model.changed(Self::submit_busy_guard())"]
-                            set_sensitive: model.submit_busy_guard.is_none(),
-                        },
+                            gtk::TextView {
+                                set_buffer: Some(&model.content_buffer),
+                                set_hexpand: true,
+                                set_css_classes: &["frame", "view"],
+
+                                set_monospace: true,
+                                set_wrap_mode: gtk::WrapMode::Word,
+                                set_vscroll_policy: gtk::ScrollablePolicy::Natural,
+
+                                set_left_margin: 8,
+                                set_right_margin: 8,
+                                set_top_margin: 8,
+                                set_bottom_margin: 8,
+
+                                #[track = "model.changed(Self::submit_busy_guard())"]
+                                set_sensitive: model.submit_busy_guard.is_none(),
+                            }
+                        }
                     },
 
                     add_breakpoint = adw::Breakpoint::new(