diff options
author | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-10-19 10:07:05 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-10-19 10:07:05 +0200 |
commit | 3d618f8a7a55683c587399699891bb5a6880a0d3 (patch) | |
tree | ff2c69ea00bf61ce34f49c91356ba81fc0c02d21 /src | |
parent | 49c5300ccd2700a5e812da540c91d238c953b07b (diff) | |
download | uGFX-3d618f8a7a55683c587399699891bb5a6880a0d3.tar.gz uGFX-3d618f8a7a55683c587399699891bb5a6880a0d3.tar.bz2 uGFX-3d618f8a7a55683c587399699891bb5a6880a0d3.zip |
Adding boarder highlight if focused to checkbox widget
Diffstat (limited to 'src')
-rw-r--r-- | src/gwin/gwin_checkbox.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gwin/gwin_checkbox.c b/src/gwin/gwin_checkbox.c index 78066567..e0115608 100644 --- a/src/gwin/gwin_checkbox.c +++ b/src/gwin/gwin_checkbox.c @@ -196,6 +196,9 @@ void gwinCheckboxDraw_CheckOnLeft(GWidgetObject *gw, void *param) { if (gw->g.flags & GCHECKBOX_FLG_CHECKED) gdispGFillArea(gw->g.display, gw->g.x+df, gw->g.y+df, ld-2*df, ld-2*df, pcol->fill); + // Render highlighted border if focused + _gwidgetDrawFocusRect(gw, 1, 1, ld-2, ld-2); + // Draw the text gdispGFillStringBox(gw->g.display, gw->g.x+ld+1, gw->g.y, gw->g.width-ld-1, gw->g.height, gw->text, gw->g.font, pcol->text, gw->pstyle->background, justifyLeft); #undef gcw @@ -225,6 +228,9 @@ void gwinCheckboxDraw_CheckOnRight(GWidgetObject *gw, void *param) { if (gw->g.flags & GCHECKBOX_FLG_CHECKED) gdispGFillArea(gw->g.display, gw->g.x+ep+df, gw->g.y+df, ld-2*df, ld-2*df, pcol->fill); + // Render highlighted border if focused + _gwidgetDrawFocusRect(gw, ep+1, 1, ld-2, ld-2); + // Draw the text gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, ep-1, gw->g.height, gw->text, gw->g.font, pcol->text, gw->pstyle->background, justifyRight); #undef gcw |