[Xfce4-commits] <postler:master> Use 'xpad' of cell renderer instead of border width

Christian Dywan noreply at xfce.org
Mon Apr 11 23:48:02 CEST 2011


Updating branch refs/heads/master
         to c7831afefa1990919185289b00bd902bde59ebf1 (commit)
       from df094cd432be2aabe33c31f76e37fec9eb2a86ff (commit)

commit c7831afefa1990919185289b00bd902bde59ebf1
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Apr 11 23:14:04 2011 +0200

    Use 'xpad' of cell renderer instead of border width
    
    So the padding uses the treeview background colour.

 postler/postler-bureau.vala  |    1 -
 postler/postler-folders.vala |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 59774cd..2ffafc7 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -775,7 +775,6 @@ public class Postler.Bureau : Gtk.Window {
         statuslabel.justify = Gtk.Justification.CENTER;
         statuslabel.ellipsize = Pango.EllipsizeMode.END;
         var panebox = new Gtk.VBox (false, 0);
-        panebox.border_width = 4;
         panebox.pack_start (folderbox, true, true, 0);
         panebox.pack_end (progressbar, false, false, 0);
         panebox.pack_end (statuslabel, false, false, 0);
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index e9c6543..13c0b3f 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -169,8 +169,14 @@ public class Postler.Folders : Gtk.TreeView {
             typeof (AccountInfo), typeof (GLib.FileMonitor),
             typeof (GLib.FileMonitor), typeof (GLib.FileMonitor), typeof (FolderType));
         set_model (store);
+        /* Column #0 is for padding only, that's why the expander is in #1 */
+        insert_column_with_data_func (-1, "", new Gtk.CellRendererPixbuf (),
+            (column, renderer, model, iter) => {
+                renderer.set ("xpad", 2);
+            });
         insert_column_with_attributes (-1, "Icon",
             new Gtk.CellRendererPixbuf (), "stock-id", Columns.ICON);
+        set_expander_column (get_column (1));
         insert_column_with_attributes (-1, "Folder",
             new Gtk.CellRendererText (), "markup", Columns.DISPLAY_NAME,
                                          "ellipsize", Columns.ELLIPSIZE);



More information about the Xfce4-commits mailing list