[gnome-control-center] online-accounts: Remove horizontal scrolling from accounts list



commit f86d8eb26cc922fabd6765f3ad2481b9f0218298
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Apr 4 17:28:54 2012 +0200

    online-accounts: Remove horizontal scrolling from accounts list
    
    We have enough space. Therefore, instead of having horizontal
    scrollbars, widen the text renderer and then ellipsize, if required.
    
    Implemented design:
    https://live.gnome.org/Design/SystemSettings/OnlineAccounts
    
    Fixes: https://bugzilla.gnome.org/671980

 panels/online-accounts/cc-online-accounts-panel.c |    5 +++++
 panels/online-accounts/online-accounts.ui         |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c
index ce1a4de..3f828ae 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -177,6 +177,11 @@ goa_panel_init (GoaPanel *panel)
 
   renderer = gtk_cell_renderer_text_new ();
   gtk_tree_view_column_pack_start (column, renderer, FALSE);
+  g_object_set (G_OBJECT (renderer),
+                "ellipsize", PANGO_ELLIPSIZE_END,
+                "ellipsize-set", TRUE,
+                "width-chars", 30,
+                NULL);
   gtk_tree_view_column_set_attributes (column,
                                        renderer,
                                        "markup", GOA_PANEL_ACCOUNTS_MODEL_COLUMN_MARKUP,
diff --git a/panels/online-accounts/online-accounts.ui b/panels/online-accounts/online-accounts.ui
index 531909f..3f4df6c 100644
--- a/panels/online-accounts/online-accounts.ui
+++ b/panels/online-accounts/online-accounts.ui
@@ -19,11 +19,12 @@
               <object class="GtkScrolledWindow" id="accounts-tree-scrolledwindow">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
                 <property name="shadow_type">in</property>
-                <property name="min_content_width">200</property>
                 <property name="min_content_height">250</property>
                 <child>
                   <object class="GtkTreeView" id="accounts-tree-treeview">
+                    <property name="width_request">200</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="headers_visible">False</property>



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