[geary/gtk-3.10] Improve appearance under Unity: Closes bug #727624



commit f0f47b709718ab79e77987f92a65a7ae7da9397c
Author: Jim Nelson <jim yorba org>
Date:   Mon May 12 19:18:15 2014 -0700

    Improve appearance under Unity: Closes bug #727624
    
    Toolbar improvments, primarily by removing label outright and letting
    icons do all the work. Also, from some user request, have tried
    moving icons to right side of toolbar, where they're closer to
    the conversation viewer.
    
    This does not fix dragging the window by the toolbar (that's fixed
    in 3.10, bug #709914) or the title/subtitle in the GtkHeaderBar
    being too close. We might consider using a custom title widget.

 src/client/application/geary-controller.vala |    9 +++------
 src/client/components/main-toolbar.vala      |    6 +++---
 src/client/components/pill-toolbar.vala      |    4 ++++
 3 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 3283938..f4ff9cb 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -43,17 +43,14 @@ public class GearyController : Geary.BaseObject {
     
     public const int MIN_CONVERSATION_COUNT = 50;
     
-    private const string DELETE_MESSAGE_LABEL = _("_Delete");
     private const string DELETE_MESSAGE_TOOLTIP_SINGLE = _("Delete conversation (Shift+Delete)");
     private const string DELETE_MESSAGE_TOOLTIP_MULTIPLE = _("Delete conversations (Shift+Delete)");
     private const string DELETE_MESSAGE_ICON_NAME = "edit-delete-symbolic";
     
-    private const string TRASH_MESSAGE_LABEL = _("_Trash");
     private const string TRASH_MESSAGE_TOOLTIP_SINGLE = _("Move conversation to trash (Delete, Backspace)");
     private const string TRASH_MESSAGE_TOOLTIP_MULTIPLE = _("Move conversations to trash (Delete, 
Backspace)");
     private const string TRASH_MESSAGE_ICON_NAME = "user-trash-symbolic";
     
-    private const string ARCHIVE_MESSAGE_LABEL = _("_Archive");
     private const string ARCHIVE_MESSAGE_TOOLTIP_SINGLE = _("Archive conversation (A)");
     private const string ARCHIVE_MESSAGE_TOOLTIP_MULTIPLE = _("Archive conversations (A)");
     private const string ARCHIVE_MESSAGE_ICON_NAME = "archive-symbolic";
@@ -350,20 +347,20 @@ public class GearyController : Geary.BaseObject {
         entries += find_previous_in_conversation;
         
         Gtk.ActionEntry archive_message = { ACTION_ARCHIVE_MESSAGE, ARCHIVE_MESSAGE_ICON_NAME,
-            ARCHIVE_MESSAGE_LABEL, "A", null, on_archive_message };
+            null, "A", null, on_archive_message };
         archive_message.tooltip = ARCHIVE_MESSAGE_TOOLTIP_SINGLE;
         entries += archive_message;
         
         // although this action changes according to the account's capabilities, set to Delete
         // until they're known so the "translatable" string doesn't first appear
         Gtk.ActionEntry trash_message = { ACTION_TRASH_MESSAGE, TRASH_MESSAGE_ICON_NAME,
-            TRASH_MESSAGE_LABEL, "Delete", null, on_trash_message };
+            null, "Delete", null, on_trash_message };
         trash_message.tooltip = TRASH_MESSAGE_TOOLTIP_SINGLE;
         entries += trash_message;
         add_accelerator("BackSpace", ACTION_TRASH_MESSAGE);
         
         Gtk.ActionEntry delete_message = { ACTION_DELETE_MESSAGE, DELETE_MESSAGE_ICON_NAME,
-            DELETE_MESSAGE_LABEL, "<Shift>Delete", null, on_delete_message };
+            null, "<Shift>Delete", null, on_delete_message };
         delete_message.tooltip = DELETE_MESSAGE_TOOLTIP_SINGLE;
         entries += delete_message;
         add_accelerator("<Shift>BackSpace", ACTION_DELETE_MESSAGE);
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index d6cd6e4..ee03aa8 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -68,13 +68,13 @@ public class MainToolbar : PillToolbar {
         insert.clear();
         insert.add(archive_button = create_toolbar_button(null, GearyController.ACTION_ARCHIVE_MESSAGE, 
true));
         insert.add(trash_buttons[0] = create_toolbar_button(null, GearyController.ACTION_TRASH_MESSAGE, 
true));
-        add_start(create_pill_buttons(insert));
+        add_end(create_pill_buttons(insert));
         insert.clear();
         insert.add(trash_buttons[1] = create_toolbar_button(null, GearyController.ACTION_TRASH_MESSAGE, 
true));
-        add_start(create_pill_buttons(insert, false));
+        add_end(create_pill_buttons(insert, false));
         
         // Search bar.
-        search_entry.width_chars = 32;
+        search_entry.width_chars = 28;
         search_entry.tooltip_text = _("Search all mail in account for keywords (Ctrl+S)");
         search_entry.changed.connect(on_search_entry_changed);
         search_entry.key_press_event.connect(on_search_key_press);
diff --git a/src/client/components/pill-toolbar.vala b/src/client/components/pill-toolbar.vala
index bfc22d8..be19fb4 100644
--- a/src/client/components/pill-toolbar.vala
+++ b/src/client/components/pill-toolbar.vala
@@ -32,6 +32,10 @@ public class PillToolbar : Gtk.HeaderBar {
         b.related_action.notify["tooltip"].connect(() => { b.tooltip_text = b.related_action.tooltip; });
         b.image = new Gtk.Image.from_icon_name(icon_name != null ? icon_name :
             b.related_action.icon_name, Gtk.IconSize.MENU);
+        // Unity buttons are a bit tight
+#if ENABLE_UNITY
+        b.image.margin = b.image.margin + 4;
+#endif
         b.always_show_image = true;
         
         if (!show_label)


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