Am Montag, den 26.09.2005, 11:31 +0200 schrieb Alexander Larsson: > On Tue, 2005-09-20 at 18:29 +0200, Christian Neumair wrote: > > Am Dienstag, den 20.09.2005, 18:16 +0200 schrieb Christian Neumair: > > > Am Montag, den 19.09.2005, 16:05 +0200 schrieb Alexander Larsson: > > > > On Sun, 2005-09-11 at 00:47 +0200, Christian Neumair wrote: > > > > > The proposed attached patch fixes bug 313025 [1] by ensuring a margin of > > > > > 8 on the right side of the icons. > > > > > > > > > > [1] http://bugzilla.gnome.org/show_bug.cgi?id=313025 > > > > > > > > Is this really the right fix? > > > > It seems like what the patch adds is the guarantee that there will > > > > always be an empty area of 8 pixels to the right of all icons, > > > > > > Indeed. > > > > > > > whereas the bug seems to be that the icons actually go outside the right edge. > > > > > > No. The patch complains that scrolling starts if the > > > window_width-edge_of_rightmost_icon \in [0;ICON_PAD_RIGHT]. > > > > "The patch" as of "The bug reporter". We used to add ICON_PAD_RIGHT to > > the right edge of the actual icon allocation before determining the > > scroll adjustment. > > This patch ensures that the horizontal size of the window can be reduced > > until the right edge of the window "hits" the right edge of the > > rightmost icon (plus a fuzzy px, I guess that's from the AA drawing). > > This looks better, in almost all cases currently we get far to much > whitespace on the right. > > Please commit. Also, remove the CONTAINER_PAD_RIGHT define. Attaching a new proposed patch. The last one only fixed the issue for the text above icon container layout. Note that wrapping still happens very early if all items in a directory are very tall (i.e. 2 character filenames). -- Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-icon-container.c =================================================================== RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-container.c,v retrieving revision 1.397 diff -u -p -r1.397 nautilus-icon-container.c --- libnautilus-private/nautilus-icon-container.c 19 Sep 2005 09:59:50 -0000 1.397 +++ libnautilus-private/nautilus-icon-container.c 29 Sep 2005 10:07:27 -0000 @@ -96,7 +96,6 @@ #define ICON_PAD_BOTTOM 4 #define CONTAINER_PAD_LEFT 4 -#define CONTAINER_PAD_RIGHT 4 #define CONTAINER_PAD_TOP 4 #define CONTAINER_PAD_BOTTOM 4 @@ -835,8 +834,7 @@ nautilus_icon_container_update_scroll_re x1 -= CONTAINER_PAD_LEFT; y1 -= CONTAINER_PAD_TOP; } - - x2 += CONTAINER_PAD_RIGHT; + y2 += CONTAINER_PAD_BOTTOM; if (reset_scroll_region) { @@ -1056,11 +1054,6 @@ lay_down_icons_horizontal (NautilusIconC height_below = bounds.y1 - icon_bounds.y1; /* If this icon doesn't fit, it's time to lay out the line that's queued up. */ - - /* FIXME: why don't we want to guarantee a small white space to the right of - * the last column just like we guarantee a small white space to the left of - * the first column? - */ if (line_start != p && line_width + icon_width > canvas_width ) { if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) { y += ICON_PAD_TOP; @@ -1078,7 +1071,7 @@ lay_down_icons_horizontal (NautilusIconC y += max_height_below + ICON_PAD_BOTTOM; } - line_width = 0; + line_width = container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE ? ICON_PAD_LEFT : 0; line_start = p; i = 0;
Attachment:
signature.asc
Description: This is a digitally signed message part