[fractal/zbrown/message-margin] Only add margin to the start of message rows
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/zbrown/message-margin] Only add margin to the start of message rows
- Date: Wed, 3 Apr 2019 20:57:13 +0000 (UTC)
commit cd750dec44e59af8546066bf2d196dcf63d578b1
Author: Zander Brown <zbrown gnome org>
Date: Wed Apr 3 21:50:30 2019 +0100
Only add margin to the start of message rows
Allows text to flow right to the edge, important on smaller devices
Also avoids use of child properties which are going away soon
fractal-gtk/src/widgets/message.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/fractal-gtk/src/widgets/message.rs b/fractal-gtk/src/widgets/message.rs
index e01090a6..dcae84ef 100644
--- a/fractal-gtk/src/widgets/message.rs
+++ b/fractal-gtk/src/widgets/message.rs
@@ -126,7 +126,9 @@ impl MessageBox {
// +--------+---------+
let msg_widget = gtk::Box::new(gtk::Orientation::Horizontal, 5);
let content = self.build_room_msg_content(msg, true);
- msg_widget.pack_start(&content, true, true, 50);
+ content.set_margin_start(50);
+
+ msg_widget.pack_start(&content, true, true, 0);
msg_widget
}
@@ -221,7 +223,7 @@ impl MessageBox {
w.set_justify(gtk::Justification::Left);
w.set_xalign(0.0);
w.set_valign(gtk::Align::Start);
- w.set_halign(gtk::Align::Start);
+ w.set_halign(gtk::Align::Fill);
w.set_selectable(true);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]