[gitg] Do not manually manage fixed column sizes



commit 377a336120fe34b4e26a2917786628000d453fc0
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jan 4 23:41:32 2014 +0100

    Do not manually manage fixed column sizes

 gitg/history/gitg-history-paned.vala    |   23 -----------------------
 gitg/resources/ui/gitg-history-paned.ui |   12 ++++++------
 2 files changed, 6 insertions(+), 29 deletions(-)
---
diff --git a/gitg/history/gitg-history-paned.vala b/gitg/history/gitg-history-paned.vala
index 3c44015..79a1d52 100644
--- a/gitg/history/gitg-history-paned.vala
+++ b/gitg/history/gitg-history-paned.vala
@@ -50,15 +50,6 @@ class Paned : Gtk.Paned
        [GtkChild]
        private Gtk.ScrolledWindow d_scrolled_window_commit_list;
 
-       [GtkChild]
-       private Gtk.TreeViewColumn d_column_commit_list_subject;
-
-       [GtkChild]
-       private Gtk.TreeViewColumn d_column_commit_list_author;
-
-       [GtkChild]
-       private Gtk.TreeViewColumn d_column_commit_list_author_date;
-
        [Notify]
        public Gtk.Orientation inner_orientation
        {
@@ -119,20 +110,6 @@ class Paned : Gtk.Paned
                d_renderer_commit_list_author_date.add_class("dim-label");
 
                d_stack_switcher_panels.set_stack(d_stack_panel);
-
-               d_commit_list_view.size_allocate.connect(on_list_view_size_allocate);
-       }
-
-       private void on_list_view_size_allocate(Gtk.Widget view, Gtk.Allocation alloc)
-       {
-               // Resize columns
-               int subject = (int)(0.6 * alloc.width);
-               int author = (int)(0.6 * (alloc.width - subject));
-               int date = alloc.width - subject - author;
-
-               d_column_commit_list_subject.fixed_width = subject;
-               d_column_commit_list_author.fixed_width = author;
-               d_column_commit_list_author_date.fixed_width = date;
        }
 
        public Paned()
diff --git a/gitg/resources/ui/gitg-history-paned.ui b/gitg/resources/ui/gitg-history-paned.ui
index 6b0bbab..537b1a6 100644
--- a/gitg/resources/ui/gitg-history-paned.ui
+++ b/gitg/resources/ui/gitg-history-paned.ui
@@ -88,12 +88,12 @@
                 <property name="fixed-height-mode">True</property>
                 <property name="headers-visible">False</property>
                 <child>
-                  <object class="GtkTreeViewColumn" id="d_column_commit_list_subject">
+                  <object class="GtkTreeViewColumn" id="column_commit_list_subject">
                     <property name="title" translatable="yes">Subject</property>
                     <property name="sizing">fixed</property>
                     <property name="resizable">True</property>
                     <property name="expand">True</property>
-                    <property name="fixed-width">600</property>
+                    <property name="fixed-width">50</property>
                     <child>
                       <object class="GitgCellRendererLanes" id="renderer_commit_list_subject">
                         <property name="ellipsize">end</property>
@@ -105,11 +105,11 @@
                   </object>
                 </child>
                 <child>
-                  <object class="GtkTreeViewColumn" id="d_column_commit_list_author">
+                  <object class="GtkTreeViewColumn" id="column_commit_list_author">
                     <property name="title" translatable="yes">Author</property>
                     <property name="sizing">fixed</property>
                     <property name="resizable">True</property>
-                    <property name="fixed-width">200</property>
+                    <property name="fixed-width">150</property>
                     <child>
                       <object class="GdStyledTextRenderer" id="d_renderer_commit_list_author">
                         <property name="ellipsize">end</property>
@@ -121,11 +121,11 @@
                   </object>
                 </child>
                 <child>
-                  <object class="GtkTreeViewColumn" id="d_column_commit_list_author_date">
+                  <object class="GtkTreeViewColumn" id="column_commit_list_author_date">
                     <property name="title" translatable="yes">Date</property>
                     <property name="sizing">fixed</property>
                     <property name="resizable">True</property>
-                    <property name="fixed-width">250</property>
+                    <property name="fixed-width">100</property>
                     <child>
                       <object class="GdStyledTextRenderer" id="d_renderer_commit_list_author_date">
                         <property name="ellipsize">end</property>


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