| Re: [hatari-devel] beautify sdl-gui underlines patch |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi Eero, Good thing you said no, because this one is better.
--- hatari/src/gui-sdl/sdlgui.c 2015-01-29 11:17:24.000000000 -0800
+++ hatari/src/gui-sdl/sdlgui.c 2015-02-01 23:43:01.000000000 -0800
@@ -186,7 +186,7 @@
/* 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);
+ colors.underline = SDL_MapRGB(pSdlGuiScrn->format, 255, 255,255);
colors.editfield = SDL_MapRGB(pSdlGuiScrn->format,160,160,160);
return 0;
@@ -235,16 +235,10 @@
*/
static void SDLGui_TextInt(int x, int y, const char *txt, bool underline)
{
- int i, offset;
+ int i;
unsigned char c;
SDL_Rect sr, dr;
- /* underline offset needs to go outside the box for smaller font */
- if (sdlgui_fontheight < 16)
- offset = sdlgui_fontheight + 1;
- else
- offset = sdlgui_fontheight - 2;
-
i = 0;
while (txt[i])
{
@@ -256,8 +250,6 @@
c = txt[i++];
if (c == UNDERLINE_INDICATOR && underline)
{
- dr.h = 1;
- dr.y += offset;
SDL_FillRect(pSdlGuiScrn, &dr, colors.underline);
continue;
}
Attachment:
NewLook-Hatari v1.8.0.png
Description: PNG image
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |