[geary: 2/6] composer: Style improvements for attachment box



commit d3aff682734fca9ec8342841399154e839aa6ead
Author: James Westman <flyingpimonster gmail com>
Date:   Wed Jan 29 15:48:43 2020 -0600

    composer: Style improvements for attachment box
    
    - Add separators between rows
    - Use icon instead of text for remove button

 src/client/composer/composer-widget.vala | 12 +++++++++---
 ui/composer-widget.ui                    |  5 ++---
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 40d4b30f..ad73faf3 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -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();
     }
diff --git a/ui/composer-widget.ui b/ui/composer-widget.ui
index aad1080d..515891be 100644
--- a/ui/composer-widget.ui
+++ b/ui/composer-widget.ui
@@ -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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]