From bde39bf985aeb814458e49bdb063aaad53ce00ef Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Tue, 7 Jul 2020 16:25:05 +1000 Subject: [PATCH] Composer.Widget: Place composer action bars into their own container Use CSS instead of widget props to ensure widgets have sufficient white space. This will allow adding additional action bars (e.g. by plugins) in a more straight-forward manner. --- src/client/composer/composer-widget.vala | 6 ++---- ui/composer-widget.ui | 25 ++++++++++++++++-------- ui/geary.css | 8 ++++++++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala index 9b5ca74d..c454275f 100644 --- a/src/client/composer/composer-widget.vala +++ b/src/client/composer/composer-widget.vala @@ -419,6 +419,8 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface { [GtkChild] private Gtk.Label message_overlay_label; [GtkChild] + private Gtk.Box action_bar_box; + [GtkChild] private Gtk.Box attachments_box; [GtkChild] private Gtk.Box hidden_on_attachment_drag_over; @@ -1953,8 +1955,6 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface { wrapper_box.pack_start(new Gtk.Separator(HORIZONTAL)); Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6); - box.margin_top = 6; - box.margin_bottom = 6; wrapper_box.pack_start(box); /// In the composer, the filename followed by its filesize, i.e. "notes.txt (1.12KB)" @@ -1963,8 +1963,6 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface { Gtk.Label label = new Gtk.Label(label_text); box.pack_start(label); label.halign = Gtk.Align.START; - label.margin_start = 4; - label.margin_end = 4; Gtk.Button remove_button = new Gtk.Button.from_icon_name("user-trash-symbolic", BUTTON); box.pack_start(remove_button, false, false); diff --git a/ui/composer-widget.ui b/ui/composer-widget.ui index bad90d35..cf57b42c 100644 --- a/ui/composer-widget.ui +++ b/ui/composer-widget.ui @@ -575,6 +575,18 @@ + + + False + True + 3 + + + + + True + False + vertical True @@ -1219,28 +1231,25 @@ False True - 3 + 4 True False - 6 - 6 - 6 - 6 - 0 - 3 vertical + False True - 4 + 5 diff --git a/ui/geary.css b/ui/geary.css index 355882e6..0ddfab30 100644 --- a/ui/geary.css +++ b/ui/geary.css @@ -191,6 +191,14 @@ grid.geary-message-summary { border-radius: 0px; } +.geary-attachments-box > box > box { + margin: 6px; +} + +.geary-attachments-box > box > box > label { + margin: 0px 4px; +} + /* AttachmentPane */ .geary-attachment-pane flowbox {