composer: Style improvements for attachment box

- Add separators between rows
- Use icon instead of text for remove button
This commit is contained in:
James Westman 2020-01-29 15:48:43 -06:00 committed by James Westman
parent 233a1a6c37
commit d3aff68273
2 changed files with 11 additions and 6 deletions

View file

@ -1821,8 +1821,14 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
);
}
Gtk.Box wrapper_box = new Gtk.Box(VERTICAL, 0);
this.attachments_box.pack_start(wrapper_box);
wrapper_box.pack_start(new Gtk.Separator(HORIZONTAL));
Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
this.attachments_box.pack_start(box);
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)"
string label_text = _("%s (%s)").printf(target.get_basename(),
@ -1833,9 +1839,9 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
label.margin_start = 4;
label.margin_end = 4;
Gtk.Button remove_button = new Gtk.Button.with_mnemonic(Stock._REMOVE);
Gtk.Button remove_button = new Gtk.Button.from_icon_name("user-trash-symbolic", BUTTON);
box.pack_start(remove_button, false, false);
remove_button.clicked.connect(() => remove_attachment(target, box));
remove_button.clicked.connect(() => remove_attachment(target, wrapper_box));
update_attachments_view();
}

View file

@ -1230,10 +1230,9 @@
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="margin_top">0</property>
<property name="margin_bottom">3</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<placeholder/>
</child>