From 978f8b6c4fca28db6b488478db3a960648fdff7e Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 29 Jul 2013 16:33:20 +1000 Subject: [PATCH 1/4] Fix compile error in gwinGetPixelColor() --- src/gwin/gwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index f5d78ac6..998fb8d3 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -396,7 +396,7 @@ void gwinBlitArea(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coor #if GDISP_NEED_PIXELREAD color_t gwinGetPixelColor(GHandle gh, coord_t x, coord_t y) { if (!((gh->flags & GWIN_FLG_VISIBLE))) - return; + return defaultBgColor; #if GDISP_NEED_CLIP gdispSetClip(gh->x, gh->y, gh->width, gh->height); From 319d79f296d222cb5a01144bd8e8907cdb13c0ff Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 29 Jul 2013 16:32:41 +1000 Subject: [PATCH 2/4] Fix text padding of a right aligned checkbox --- src/gwin/checkbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gwin/checkbox.c b/src/gwin/checkbox.c index 9121a55b..7a6198de 100644 --- a/src/gwin/checkbox.c +++ b/src/gwin/checkbox.c @@ -190,7 +190,7 @@ void gwinCheckboxDraw_CheckOnRight(GWidgetObject *gw, void *param) { if (gw->g.flags & GCHECKBOX_FLG_CHECKED) gdispFillArea(gw->g.x+ep+df, gw->g.y+df, ld-2*df, ld-2*df, pcol->fill); - gdispFillStringBox(gw->g.x, gw->g.y, ep, gw->g.height, gw->text, gw->g.font, pcol->text, gw->pstyle->background, justifyRight); + gdispFillStringBox(gw->g.x, gw->g.y, ep-1, gw->g.height, gw->text, gw->g.font, pcol->text, gw->pstyle->background, justifyRight); #undef gcw } From 3af74801dd195a267b2c0cba17627e1b40ff1a8c Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sun, 28 Jul 2013 14:13:05 +0200 Subject: [PATCH 3/4] clear after mouse calibration to avoid silly display --- src/ginput/mouse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index 28707d8b..5459a4cd 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -509,6 +509,13 @@ bool_t ginputCalibrateMouse(uint16_t instance) { MouseConfig.fnsavecal(instance, (const uint8_t *)&MouseConfig.caldata, sizeof(MouseConfig.caldata)); MouseConfig.flags |= FLG_CAL_SAVED; } + + // Clear the screen using the GWIN default background color + #if GFX_USE_GWIN + gdispClear(gwinGetDefaultBgColor()); + #else + gdispClear(White); + #endif return TRUE; #endif From 9ed89f9ad35f5dbc5fa4afb155bbe87c83f17ac6 Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 29 Jul 2013 16:42:24 +1000 Subject: [PATCH 4/4] Change screen clear to match initial screen state (Black) in a non-GWIN situation. --- src/ginput/mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index 5459a4cd..74b5a990 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -514,7 +514,7 @@ bool_t ginputCalibrateMouse(uint16_t instance) { #if GFX_USE_GWIN gdispClear(gwinGetDefaultBgColor()); #else - gdispClear(White); + gdispClear(Black); #endif return TRUE;