commit f5b7b0b1b8bd59301c8d1836214781e401ec5b77
parent 813a2af57898526f3b192c4d0adddffc2ea57003
Author: William Casarin <jb55@jb55.com>
Date: Thu, 6 Jul 2023 10:11:04 -0700
text: make content selectable
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs
@@ -334,7 +334,7 @@ fn render_events(ui: &mut egui::Ui, damus: &mut Damus) {
ui.with_layout(egui::Layout::top_down(egui::Align::LEFT), |ui| {
render_username(ui, &damus.contacts, &ev.pubkey);
- ui.label(&ev.content);
+ selectable_text(ui, &ev.content);
})
});
@@ -342,6 +342,10 @@ fn render_events(ui: &mut egui::Ui, damus: &mut Damus) {
}
}
+fn selectable_text(ui: &mut egui::Ui, mut text: &str) {
+ ui.add(egui::TextEdit::multiline(&mut text));
+}
+
fn timeline_view(ui: &mut egui::Ui, app: &mut Damus) {
ui.heading("Timeline");