[hatari-devel] beautify sdl-gui underlines patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] beautify sdl-gui underlines patch
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Wed, 28 Jan 2015 18:02:43 -0700 (MST)
- Thread-index: w4xHnBkIoQQjE+XssSCMn+yTulFNPg==
- Thread-topic: beautify sdl-gui underlines patch
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);