Adding boarder highlight if focused to checkbox widget
This commit is contained in:
parent
49c5300ccd
commit
3d618f8a7a
@ -196,6 +196,9 @@ void gwinCheckboxDraw_CheckOnLeft(GWidgetObject *gw, void *param) {
|
|||||||
if (gw->g.flags & GCHECKBOX_FLG_CHECKED)
|
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);
|
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
|
// 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);
|
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
|
#undef gcw
|
||||||
@ -225,6 +228,9 @@ void gwinCheckboxDraw_CheckOnRight(GWidgetObject *gw, void *param) {
|
|||||||
if (gw->g.flags & GCHECKBOX_FLG_CHECKED)
|
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);
|
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
|
// 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);
|
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
|
#undef gcw
|
||||||
|
Loading…
Reference in New Issue
Block a user