Adding boarder highlight if focused to checkbox widget

ugfx_release_2.6
Joel Bodenmann 2015-10-19 10:07:05 +02:00
parent 49c5300ccd
commit 3d618f8a7a
1 changed files with 6 additions and 0 deletions

View File

@ -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