[gnome-contacts] A lot of UX fixes.



commit bdbde540eff85183199753c7a78e82777ca45cda
Author: Erick PÃrez Castellanos <erick red gmail com>
Date:   Tue Dec 18 16:09:50 2012 -0500

    A lot of UX fixes.
    
    * Detail combo-boxes unstyled.
    * Grid broken. Persona heading layout fixed.
    * Edit-toolbar appear effect removed
    * Frame around button set when in edit-mode.
    * Detail combo-boxes expanded, and labels left-aligned.
    * [New Detail] button vcentered and label changed.

 src/contacts-contact-editor.vala |    9 ++++-----
 src/contacts-contact-pane.vala   |   21 +++++++++++----------
 src/contacts-contact-sheet.vala  |    2 +-
 src/contacts-types.vala          |    1 -
 4 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala
index ebc927f..e12c25f 100644
--- a/src/contacts-contact-editor.vala
+++ b/src/contacts-contact-editor.vala
@@ -226,7 +226,6 @@ public class Contacts.ContactEditor : Grid {
   void attach_row_with_entry (TypeSet type_set, AbstractFieldDetails details, string value, int row) {
     var combo = new TypeCombo (type_set);
     combo.set_hexpand (false);
-    combo.set_halign (Align.END);
     combo.set_active (details);
     attach (combo, 0, row, 1, 1);
 
@@ -255,7 +254,7 @@ public class Contacts.ContactEditor : Grid {
   void attach_row_with_entry_labeled (string title, AbstractFieldDetails? details, string value, int row) {
     var title_label = new Label (title);
     title_label.set_hexpand (false);
-    title_label.set_halign (Align.END);
+    title_label.set_halign (Align.START);
     title_label.margin_right = 6;
     attach (title_label, 0, row, 1, 1);
 
@@ -281,7 +280,7 @@ public class Contacts.ContactEditor : Grid {
   void attach_row_with_text_labeled (string title, AbstractFieldDetails? details, string value, int row) {
     var title_label = new Label (title);
     title_label.set_hexpand (false);
-    title_label.set_halign (Align.END);
+    title_label.set_halign (Align.START);
     title_label.set_valign (Align.START);
     title_label.margin_top = 3;
     title_label.margin_right = 6;
@@ -315,7 +314,7 @@ public class Contacts.ContactEditor : Grid {
   void attach_row_for_birthday (string title, AbstractFieldDetails? details, DateTime birthday, int row) {
     var title_label = new Label (title);
     title_label.set_hexpand (false);
-    title_label.set_halign (Align.END);
+    title_label.set_halign (Align.START);
     title_label.margin_right = 6;
     attach (title_label, 0, row, 1, 1);
 
@@ -370,7 +369,6 @@ public class Contacts.ContactEditor : Grid {
   void attach_row_for_address (TypeSet type_set, PostalAddressFieldDetails details, int row) {
     var combo = new TypeCombo (type_set);
     combo.set_hexpand (false);
-    combo.set_halign (Align.END);
     combo.set_active (details);
     attach (combo, 0, row, 1, 1);
 
@@ -631,6 +629,7 @@ public class Contacts.ContactEditor : Grid {
     var image_frame = new ContactFrame (PROFILE_SIZE, true);
     image_frame.set_vexpand (false);
     image_frame.set_valign (Align.START);
+    (image_frame.get_child () as Button).set_relief (ReliefStyle.NORMAL);
     image_frame.clicked.connect ( () => {
 	change_avatar (c, image_frame);
       });
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 75fc9b1..2d5ff84 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -53,7 +53,6 @@ public class Contacts.ContactPane : Grid {
 
   public bool on_edit_mode;
   private Gd.MainToolbar edit_toolbar;
-  private Revealer edit_revealer;
   private ContactEditor editor;
 
   /* single value details */
@@ -258,9 +257,13 @@ public class Contacts.ContactPane : Grid {
 
     var add_detail_button = new Gtk.MenuButton ();
     var box = new Grid ();
+    var w = new Label (_("New Detail")) as Widget;
+    w.set_valign (Align.CENTER);
     box.set_column_spacing (4);
-    box.add (new Label (_("New Detail ...")));
-    box.add (new Arrow (ArrowType.DOWN, ShadowType.OUT));
+    box.add (w);
+    w = new Arrow (ArrowType.DOWN, ShadowType.OUT) as Widget;
+    w.set_valign (Align.CENTER);
+    box.add (w);
     add_detail_button.add (box);
     var details_menu = new Gtk.Menu ();
     details_menu.set_halign (Align.END);
@@ -310,12 +313,10 @@ public class Contacts.ContactPane : Grid {
 
     edit_toolbar.show_all ();
 
-    edit_revealer = new Revealer ();
-    edit_revealer.add (edit_toolbar);
-    this.add (edit_revealer);
+    this.add (edit_toolbar);
 
-    edit_revealer.set_no_show_all (true);
-    edit_revealer.hide ();
+    edit_toolbar.set_no_show_all (true);
+    edit_toolbar.hide ();
 
     editor.set_vexpand (true);
     editor.set_hexpand (true);
@@ -381,7 +382,7 @@ public class Contacts.ContactPane : Grid {
       else
 	notes_item.show ();
 
-      edit_revealer.reveal ();
+      edit_toolbar.show ();
 
       sheet.clear ();
       sheet.hide ();
@@ -420,7 +421,7 @@ public class Contacts.ContactPane : Grid {
 					       });
       }
 
-      edit_revealer.unreveal ();
+      edit_toolbar.hide ();
 
       editor.clear ();
       editor.hide ();
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 6a91502..4f9be94 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -113,7 +113,7 @@ public class Contacts.ContactSheet : Grid {
 	store_name.set_halign (Align.START);
 	store_name.xalign = 0.0f;
 	store_name.margin_left = 6;
-	attach (store_name, 0, i, 1, 1);
+	attach (store_name, 0, i, 3, 1);
 	last_store_position = ++i;
       }
 
diff --git a/src/contacts-types.vala b/src/contacts-types.vala
index 651ee7c..961981b 100644
--- a/src/contacts-types.vala
+++ b/src/contacts-types.vala
@@ -365,7 +365,6 @@ public class Contacts.TypeCombo : Grid  {
     this.type_set = type_set;
 
     combo = new ComboBox.with_model (type_set.store);
-    combo.get_style_context ().add_class ("contacts-combo");
     combo.set_halign (Align.FILL);
     combo.set_hexpand (true);
     this.add (combo);



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