[hatari-devel] beautify sdl-gui underlines patch

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

Here is a patch that makes the sdl gui menu underlines look
smaller and nicer (in my opinion).

Please compile it to see the result (in low resolution),
and also modify it if you can make it look even better.

Sincerely,
David Savinkoff
--- hatari/src/gui-sdl/sdlgui.c	2015-01-28 16:30:12.000000000 -0800
+++ hatari/src/gui-sdl/sdlgui.c	2015-01-28 16:29:33.000000000 -0800
@@ -241,7 +241,7 @@
 
 	/* underline offset needs to go outside the box for smaller font */
 	if (sdlgui_fontheight < 16)
-		offset = sdlgui_fontheight + 1;
+		offset = sdlgui_fontheight + 0;
 	else
 		offset = sdlgui_fontheight - 2;
 
@@ -256,6 +256,8 @@
 		c = txt[i++];
 		if (c == UNDERLINE_INDICATOR && underline)
 		{
+			dr.x += 1;
+			dr.w -= 2;
 			dr.h = 1;
 			dr.y += offset;
 			SDL_FillRect(pSdlGuiScrn, &dr, colors.underline);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/