Thanks for your responses.
I just wanted to throw in an updated patch that does align the icons
along the right edge *correctly* this time. The right margin may be a
little too thin for everyone's tastes, but that at least can easily be
fixed.
Bruce, great job putting the two behaviors back-to-back in your video.
Cheers,
Zoran
Index: libnautilus-private/nautilus-icon-container.c
===================================================================
--- libnautilus-private/nautilus-icon-container.c (revision 15143)
+++ libnautilus-private/nautilus-icon-container.c (working copy)
@@ -1365,6 +1365,15 @@
y += ICON_PAD_TOP + max_height_above;
}
+ /* In Tighter layout, pad the row in so it fills the canvas horizontally */
+ if (!gridded_layout) {
+ float horizontal_padding = (canvas_width - line_width) / (positions->len - 1);
+ for (i = 0; i < (int) positions->len; i++) {
+ position = &g_array_index (positions, IconPositions, i);
+ position->width += horizontal_padding;
+ }
+ }
+
lay_down_one_line (container, line_start, p, y, max_height_above, positions, FALSE);
if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
@@ -1412,12 +1421,12 @@
/* Lay down that last line of icons. */
if (line_start != NULL) {
- if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
- y += ICON_PAD_TOP;
- } else {
- /* Advance to the baseline. */
- y += ICON_PAD_TOP + max_height_above;
- }
+ if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
+ y += ICON_PAD_TOP;
+ } else {
+ /* Advance to the baseline. */
+ y += ICON_PAD_TOP + max_height_above;
+ }
lay_down_one_line (container, line_start, NULL, y, max_height_above, positions, TRUE);
--
nautilus-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nautilus-list