Re: [PATCH] Neaten up the layout for text beside icons



Because of two things.
Firstly when tight layout is turned off (we'll call this grid mode for
simplicity) icons are laid out in a fixed width grid of 210 pixels.
So, every icon will have at least 210 pixels width for this.

Secondly, the only way to guarentee a consistant baseline for the left
hand side of the text like we want is to right align the text to the
edge of the icon. So, text will always be right aligned to the 210th
pixel.

Times when this causes a problem:
a) Your case where there's lots of very small icons
b) when the icon's width is actually just over 210 pixels, in which
case the icon gets allocated 420 pixels (the next multiple of the grid
size) and so in the case of say an icon being 215 pixels wide, you end
up with 205 pixels blank space.

I think that maybe shrinking the grid size might make this work
better, but the more you shrink the grid size, the harder it is to see
the grid and so as grid_size decreases, untidyness increases and
eventually, you get it that grid mode and tight mode are actually the
same thing.

But I would suggest maybe dropping the gridsize to 100 - 150pixels?
Just to see if that makes things better.

iain


On Thu, 7 Oct 2004 09:58:50 -0400, Vincent Noel <vincent noel gmail com> wrote:
> Sorry, I meant columns and not rows.
> I have attached a screenshot that shows the gap.
> Cheers
> 
> 
> On Thu, 7 Oct 2004 09:48:28 -0400, Vincent Noel <vincent noel gmail com> wrote:
> > This is perfect.
> 
> 
> > Well, almost : why is there a big white space between each row of
> > icons (and even at the left of the first row) ? I'm sure there's a
> > sensible reason, but I can't figure it out.
> > Thanks for this, the text-besides-icon mode looks good now.
> > Cheers
> > Vincent
> >
> >
> >
> >
> > On Thu, 7 Oct 2004 00:33:36 +0100, Iain * <iaingnome gmail com> wrote:
> > > Done...
> > > iain
> > >
> > > On Wed, 06 Oct 2004 18:22:47 -0400, Dave Camp <dave novell com> wrote:
> > > > Yeah.  I think the code that's there does a baseline well assuming you
> > >
> > >
> > > > don't have any stretched icons.  That's probably the best bet -
> > > > stretched icons are a fairly rare corner case.
> > > >
> > > > -dave
> > > >
> > > >
> > > >
> > > > On Wed, 2004-10-06 at 23:05 +0100, Iain * wrote:
> > > > > Actually, I've been thinking about this, and the current way that
> > > > > nautilus lays out icons wouldn't (unless I'm mistaken) be able to do
> > > > > this. Each row is laid out and drawn, and works down, which means that
> > > > > the very first row that is laid out would be the baseline setter for
> > > > > each column, and if an icon was bigger than this baseline, it would
> > > > > push icons about all wrong.
> > > > >
> > > > > I'll think about this at more length...
> > > > >
> > > > > iain
> > > > >
> > > > >
> > > > > On Wed, 06 Oct 2004 11:38:46 -0400, Dave Camp <dave novell com> wrote:
> > > > > > Ideally we want a vertical baseline on the left hand side of the text,
> > > > > > similar to the horizontal baseline above it in normal mode.
> > > > > >
> > > > > > -dave
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Wed, 2004-10-06 at 16:29 +0100, Iain * wrote:
> > > > > > > Hmm, yes...
> > > > > > > Do we want the text labels aligned, or the icons aligned?
> > > > > > >
> > > > > > > iain
> > > > > > >
> > > > > > > On Wed, 6 Oct 2004 11:24:14 -0400, Vincent Noel <vincent noel gmail com> wrote:
> > > > > > > > The patch improves a lot the display in text-besides-icon, but the
> > > > > > > > icons are vertically misaligned. When there's only a single column of
> > > > > > > > icons it's kind of obvious (see the attached screenshot). Is this on
> > > > > > > > purpose ?
> > > > > > > > Note that even with the misalignment it's still better than before.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, 06 Oct 2004 11:07:14 -0400, Dave Camp <dave novell com> wrote:
> > > > > > > > > Looks good, please commit.
> > > > > > > > >
> > > > > > > > > -dave
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Wed, 2004-10-06 at 10:38 +0100, Iain * wrote:
> > > > > > > > > > With the recent comments on the text beside icons style I took a look
> > > > > > > > > > at making it a bit neater. Attached is a patch that lines the icons
> > > > > > > > > > and text along a centre line down the middle of the tallest icon.
> > > > > > > > > >
> > > > > > > > > > An also semi-related change is this
> > > > > > > > > > -                       position->x_offset = (MAXIMUM_IMAGE_SIZE -
> > > > > > > > > > (icon_bounds.x1 - icon_bounds.x0));
> > > > > > > > > > +                       position->x_offset = (icon_width - (bounds.x1
> > > > > > > > > > - bounds.x0)) / 2 + ICON_PAD_LEFT;
> > > > > > > > > >
> > > > > > > > > > It is possible to have an icon that is larger than MAXIMUM_IMAGE_SIZE
> > > > > > > > > > if you are viewing the desktop folder as a normal folder and have
> > > > > > > > > > stretched an icon. This change lines it up correctly. The
> > > > > > > > > > ICON_PAD_LEFT is added because there was no padding for icons in this
> > > > > > > > > > style.
> > > > > > > > > >
> > > > > > > > > > Enjoy, iain
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > nautilus-list mailing list
> > > > > > > > > nautilus-list gnome org
> > > > > > > > > http://mail.gnome.org/mailman/listinfo/nautilus-list
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> 
> 
>



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