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).

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
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
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.

Best,
Christian
-- 
Die Probe des Feinen ist nicht, gegen den Feinen fein zu sein - sie
wäre zu leicht - aber wohl gegen den Groben es zu bleiben.
                -- Jean Paul

-- 
-- 
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.
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -5967,7 +5967,7 @@ gui_mch_drawsign(int row, int col, int t
 	 * tiny differences in font size.
 	 */
 	need_scale = (width > SIGN_WIDTH + 2
-		      || height > SIGN_HEIGHT + 2
+		      || height != SIGN_HEIGHT /* might differ because of linespaceing */
 		      || (width < 3 * SIGN_WIDTH / 4
 			  && height < 3 * SIGN_HEIGHT / 4));
 	if (need_scale)
@@ -5978,7 +5978,8 @@ gui_mch_drawsign(int row, int col, int t
 	    aspect = (double)height / (double)width;
 	    width  = (double)SIGN_WIDTH * SIGN_ASPECT / aspect;
 	    width  = MIN(width, SIGN_WIDTH);
-	    height = (double)width * aspect;
+	    height  = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect;
+	    height  = MIN(height, SIGN_HEIGHT);
 
 	    /* This doesn't seem to be worth caching, and doing so
 	     * would complicate the code quite a bit. */
@@ -5996,14 +5997,6 @@ gui_mch_drawsign(int row, int col, int t
 
 	gdk_gc_set_foreground(gui.text_gc, gui.bgcolor);
 
-	gdk_draw_rectangle(gui.drawarea->window,
-			   gui.text_gc,
-			   TRUE,
-			   FILL_X(col),
-			   FILL_Y(row),
-			   SIGN_WIDTH,
-			   SIGN_HEIGHT);
-
 	gdk_pixbuf_render_to_drawable_alpha(sign,
 					    gui.drawarea->window,
 					    MAX(0, xoffset),
@@ -6013,7 +6006,7 @@ gui_mch_drawsign(int row, int col, int t
 					    MIN(width,	SIGN_WIDTH),
 					    MIN(height, SIGN_HEIGHT),
 					    GDK_PIXBUF_ALPHA_BILEVEL,
-					    127,
+					    MIN(height, SIGN_HEIGHT),
 					    GDK_RGB_DITHER_NORMAL,
 					    0, 0);
 	if (need_scale)

Raspunde prin e-mail lui