Christian wrote:

> Bram,
> I noticed, when displaying icon signs in the gui version of Vim there 
> might be a small line not overdrawn by the sign, caused by the 
> 'linespace' setting set to be one. That does look rather ugly, if you 
> display several signs side by side (see attached screenshot).

Do you mean that the dark line below the "+" sign should not be there?
And if 'linespace' is set to zero that black line is indeed gone?

> Here is a patch. A couple of comments:
> 1) I am not sure, why a call to gdk_draw_rectangle() is done in the 
> existing code. I have left it out as it seems to be unnecessary

I believe this is needed to first clear the area with the background
color, in case the icon drawn is smaller than the available space.
Perhaps you can try it with a rectangular icon, vertically and
horizontally. E.g. something like a red exclamation mark.  There would
need to be some other sign at first to see any effect.

> 2) not sure, why a height of 127 was hard coded when drawing the size 
> area. I have used the actual sign size for that

The 127 is the value for "alpha_threshold".  At least according to the
documentation I found.

> 3) when the sign hight differs from the char_height, it will always be 
> rescaled. This of course has the additional disadvantage of causing a 
> performance issue. Not sure, if this is noticeable, though.

I don't think we should worry about performance.

It appears that after your change the aspect ratio of the sign is not
kept.  Although that would be OK for filling the gap, if the sign was
really a different shape it would look weird.  In your specific case you
would want the sign to fill the available space and probably don't care
about keeping the aspect ratio.  Adding a setting for this woule make it
complicated...

How about this: if we can fill the available space with a slightly
different ascpect ratio, e.g., 10% different, filling the gap is nicer
than the slightly different aspect ratio.  If we change the aspect ratio
more than 10% or so the icon will start looking weird and we stick to
the aspect ratio and as a result there will be a gap (either vertically
or horizontally).

The names are a bit confusing, SIGN_ASPECT actually means the aspect
ratio of the space availeble, with "aspect" is the aspect ratio of the
sign being drawn.

This also very much depends on the font size, since the space used for
the icon is two character cells wide and one character cell plus
'linespace' high.


-- 
FIRST HEAD: All right! All right! We'll kill him first and then have tea and
            biscuits.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui