Merge branch 'master' into Keil
This commit is contained in:
commit
fbe7df3008
3 changed files with 14 additions and 2 deletions
|
@ -176,6 +176,9 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) {
|
||||||
gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width-1, gw->g.height-1, gw->text, gw->g.font, pcol->text, pcol->fill, justifyCenter);
|
gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width-1, gw->g.height-1, gw->text, gw->g.font, pcol->text, pcol->fill, justifyCenter);
|
||||||
gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, pcol->edge);
|
gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, pcol->edge);
|
||||||
gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gw->g.height-1, gw->g.x+gw->g.width-2, gw->g.y+gw->g.height-1, pcol->edge);
|
gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gw->g.height-1, gw->g.x+gw->g.width-2, gw->g.y+gw->g.height-1, pcol->edge);
|
||||||
|
|
||||||
|
// Render highlighted border if focused
|
||||||
|
_gwidgetDrawFocusRect(gw, 1, 1, gw->g.width-2, gw->g.height-2);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void gwinButtonDraw_Normal(GWidgetObject *gw, void *param) {
|
void gwinButtonDraw_Normal(GWidgetObject *gw, void *param) {
|
||||||
|
@ -199,6 +202,9 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) {
|
||||||
gdispGDrawStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width-1, gw->g.height-1, gw->text, gw->g.font, pcol->text, justifyCenter);
|
gdispGDrawStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width-1, gw->g.height-1, gw->text, gw->g.font, pcol->text, justifyCenter);
|
||||||
gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, pcol->edge);
|
gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, pcol->edge);
|
||||||
gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gw->g.height-1, gw->g.x+gw->g.width-2, gw->g.y+gw->g.height-1, pcol->edge);
|
gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gw->g.height-1, gw->g.x+gw->g.width-2, gw->g.y+gw->g.height-1, pcol->edge);
|
||||||
|
|
||||||
|
// Render highlighted border if focused
|
||||||
|
_gwidgetDrawFocusRect(gw, 0, 0, gw->g.width-1, gw->g.height-1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void SendCheckboxEvent(GWidgetObject *gw) {
|
||||||
{
|
{
|
||||||
// Only react on KEYDOWN events. Ignore KEYUP events.
|
// Only react on KEYDOWN events. Ignore KEYUP events.
|
||||||
if (pke->keystate & GKEYSTATE_KEYUP) {
|
if (pke->keystate & GKEYSTATE_KEYUP) {
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ENTER and SPACE keys to check/uncheck the checkbox
|
// ENTER and SPACE keys to check/uncheck the checkbox
|
||||||
|
@ -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
|
||||||
|
|
|
@ -242,7 +242,7 @@ static void gwinTexteditDefaultDraw(GWidgetObject* gw, void* param)
|
||||||
// Render border
|
// Render border
|
||||||
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, ccol);
|
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, ccol);
|
||||||
|
|
||||||
// Render highlighted border of focused
|
// Render highlighted border if focused
|
||||||
_gwidgetDrawFocusRect(gw, 1, 1, gw->g.width-2, gw->g.height-2);
|
_gwidgetDrawFocusRect(gw, 1, 1, gw->g.width-2, gw->g.height-2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue