Adding boarder highlight if focused to button widget
This commit is contained in:
parent
79dfee0806
commit
288e928ade
1 changed files with 6 additions and 0 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);
|
||||
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);
|
||||
|
||||
// Render highlighted border if focused
|
||||
_gwidgetDrawFocusRect(gw, 1, 1, gw->g.width-2, gw->g.height-2);
|
||||
}
|
||||
#else
|
||||
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);
|
||||
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);
|
||||
|
||||
// Render highlighted border if focused
|
||||
_gwidgetDrawFocusRect(gw, 0, 0, gw->g.width-1, gw->g.height-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue