[crossfire] GTK2 Client Column title patch.

Kevin R. Bulgrien kbulgrien at worldnet.att.net
Sat Jul 21 23:36:54 CDT 2007


A previous attempt to send this message didn't seem to work for some
reason.

> Headings
> 
> Some title headings will not render properly at any setting.  I am sure this
> is not related to the screen resolution as mine is a dual-head 1280x1024
> and no matter how wide the client is, the Weight\column title is always cut
> off.  There is no reason for that as the description column is so big, as I
> test, that it is more than 50% white space.

I would like to make this change in both trunk and branch/1.x.  Anyone have
a problem with it?  It works at 1280x1024 which is what the README says is
the target of the design. The commentary can be removed as desired.

A screenshot is at http://krayvin.home.att.net/gtk2client.png - Nnte how the
gravestone weights are about the same width as the title after the
modification.

$ svn diff src/inventory.c
Index: src/inventory.c
===================================================================
--- src/inventory.c     (revision 6798)
+++ src/inventory.c     (working copy)
@@ -321,12 +321,14 @@
     column = gtk_tree_view_column_new_with_attributes ("Weight", renderer,
                                                       "text", LIST_WEIGHT,
                                                       NULL);
-    /* 50 is just a guess.  However, testing showed that with auto resize,
-     * the name column for some objects is very long, which causes weight
-     * column to be pushed off the right edge and not fully visible.  Given
-     * the choice, I'd rather have the name truncated.
+    /* At 50, the title was always truncated on some systems.  64 is the
+     * minimum on those systems for it to be possible to avoid truncation
+     * at all.  Truncating the title looks cheesy, especially since heavy
+     * items (100+) need the width of the field anyway.  If weight pushed
+     * off the edge is a problem, it would be just better to let the user
+     * resize or find a way to allow rendering with a smaller font.
      */
-    gtk_tree_view_column_set_min_width(column, 50);
+    gtk_tree_view_column_set_min_width(column, 64);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);

     gtk_tree_view_column_set_sort_column_id(column, LIST_WEIGHT);



More information about the crossfire mailing list