GNOME Bugzilla – Bug 310348
"folder, x items" off-center in the side pane
Last modified: 2005-07-14 16:35:45 UTC
See upcoming screenshot
Created attachment 49163 [details] screenshot showing the problem
The problem here is that pangolayouts on GtkLabel don't offer proper wrapping and/or shrinking capabilities. I don't remember the details.
This is actually the same issue as described by bug 43858, although it refers to another PangoLayout'ed label on the sidepane. *** This bug has been marked as a duplicate of 43858 ***
Mmmh, I'm not sure if it's a duplicate... I'm not complaining about the string being cut on the left and right when the pane is too small (as in bug 43858) - I'm saying that the "folder, x items" string is not centered like the other items : if you resize the side pane, all items are centered on the middle of the side pane, except this one.
even if there is enough space for it?
Yep - look at the screenshot in attachment 49163 [details] : the line should say "folder, 4 items". There is enough room to display it, but instead of being centered in the middle of the side pane the line is centered on some other point further right. If I expand the side pane wide enough to show the "date" line entirely, the "folder, 4 items" line is centered fine.
Oh, ok, I get it - the "folder" line is part in the same paragraph with the "date" line, so both lines are centered on the same spot, which is dictated by the width of the "date" line. Wouldn't it be possible to make them independent lines ? Or is that a bad idea ?
Yes we could...but I'm not really eager to make such half-assed fixes. The real fix is to get GtkLabel wrapping done properly. Also, the impact is IMHO really minor, since you can also read the number of containing items in the statusbar. I think we could do way more useful things with the sidebar... .
You're right :-) In the meantime, though, allowing ellipsis on the paragraph actually helps a lot - the "folder" line becomes correctly centered and the side pane looks a lot better overall... Index: src/nautilus-sidebar-title.c =================================================================== RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v retrieving revision 1.151 diff -u -r1.151 nautilus-sidebar-title.c --- src/nautilus-sidebar-title.c 13 Jul 2005 12:23:37 -0000 1.151 +++ src/nautilus-sidebar-title.c 14 Jul 2005 16:27:09 -0000 @@ -469,6 +469,7 @@ } gtk_label_set_text (GTK_LABEL (sidebar_title->details->more_info_label), info_string->str); + gtk_label_set_ellipsize (GTK_LABEL (sidebar_title->details->more_info_label), PANGO_ELLIPSIZE_END); g_string_free (info_string, TRUE);
Created attachment 49178 [details] screenshot with ellipsis compare with previous screenshot