Making an empty TreeView sub-column not take up any space

[Please CC replies to cactus cactus rulez org]


I'd like to create a pixbuf sub-column inside a GtkTreeView column that doesn't take up any space when the pixbuf is empty. Currently I'm setting up the view like this:

    column = gtk_tree_view_column_new ();

    renderer = gtk_cell_renderer_pixbuf_new ();
    gtk_tree_view_column_pack_start (column, renderer, false);
gtk_tree_view_column_add_attribute (column, renderer, "pixbuf", COLUMN_ICON);

    renderer = gtk_cell_renderer_text_new ();
    gtk_tree_view_column_pack_start (column, renderer, true);
gtk_tree_view_column_add_attribute (column, renderer, "text", COLUMN_LABEL);

    gtk_tree_view_append_column (treeview, column);

However, as you can see in this screenshot:
the same width is allocated for empty pixbufs.

How can I avoid that?


   .--= ULLA! =---------------------.   `We are not here to give users what
   \     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Voltam IQ-teszten. Szerencsére negatív.

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