Re: [hatari-devel] beautify sdl-gui underlines patch

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


Hi,

I think this needs opinions from others.

On maanantai 02 helmikuu 2015, David Savinkoff wrote:
> Good thing you said no, because this one is better.

First you were saying that you want shortcut indicator to be less visible, 
but your new patch makes it much more visible?


I saw from your screenshots what I think you had an issue with, underlines 
going over the text on next line.  What about attached patch?

With it the underline in non-zoomed mode doesn't go over next line text 
(like currently), it doesn't go over button border (like in your previous 
patch).  And it uses more visible color (in non-zoomed mode) because 
otherwise underline could be mistook for a badly rendered font.


	- Eero
--- a/src/gui-sdl/sdlgui.c	Mon Feb 02 23:25:24 2015 +0100
+++ b/src/gui-sdl/sdlgui.c	Tue Feb 03 22:04:59 2015 +0200
@@ -186,7 +186,10 @@
 	/* others */
 	colors.focus     = SDL_MapRGB(pSdlGuiScrn->format,212,212,212);
 	colors.cursor    = SDL_MapRGB(pSdlGuiScrn->format,128,128,128);
-	colors.underline = SDL_MapRGB(pSdlGuiScrn->format,  0,  0,255);
+	if (sdlgui_fontheight < 16)
+		colors.underline = SDL_MapRGB(pSdlGuiScrn->format,255,0,255);
+	else
+		colors.underline = SDL_MapRGB(pSdlGuiScrn->format,0,0,0);		
 	colors.editfield = SDL_MapRGB(pSdlGuiScrn->format,160,160,160);
 
 	return 0;
@@ -241,7 +244,7 @@
 
 	/* underline offset needs to go outside the box for smaller font */
 	if (sdlgui_fontheight < 16)
-		offset = sdlgui_fontheight + 1;
+		offset = sdlgui_fontheight - 1;
 	else
 		offset = sdlgui_fontheight - 2;
 


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