aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Bodenmann <info@b-electronics.ch>2016-07-14 23:26:32 +0200
committerJoel Bodenmann <info@b-electronics.ch>2016-07-14 23:26:32 +0200
commit5ad68305a7c5929ca9e31ca7682fcce5dded769b (patch)
tree74e8397bc3164d18f6ec4bb2379dc9d7b27cca65
parent2b279df17a236d7d649afa0b4b573a09f6b7b522 (diff)
parent365b7ac7027c4f99353eaf486daf7b53e9805ba4 (diff)
downloaduGFX-5ad68305a7c5929ca9e31ca7682fcce5dded769b.tar.gz
uGFX-5ad68305a7c5929ca9e31ca7682fcce5dded769b.tar.bz2
uGFX-5ad68305a7c5929ca9e31ca7682fcce5dded769b.zip
Merged in mattbrejza/ugfx/btn-ellipse-fix (pull request #26)
fixing ellipse button drawing
-rw-r--r--src/gwin/gwin_button.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gwin/gwin_button.c b/src/gwin/gwin_button.c
index c96d3cdd..41c736e6 100644
--- a/src/gwin/gwin_button.c
+++ b/src/gwin/gwin_button.c
@@ -238,9 +238,9 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) {
pcol = getButtonColors(gw);
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->pstyle->background);
- gdispGFillEllipse(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width/2-1, gw->g.height/2-1, pcol->fill);
+ gdispGFillEllipse(gw->g.display, gw->g.x+gw->g.width/2, gw->g.y+gw->g.height/2, gw->g.width/2-2, gw->g.height/2-2, pcol->fill);
gdispGDrawStringBox(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width-2, gw->g.height-2, gw->text, gw->g.font, pcol->text, justifyCenter);
- gdispGDrawEllipse(gw->g.display, gw->g.x, gw->g.y, gw->g.width/2, gw->g.height/2, pcol->edge);
+ gdispGDrawEllipse(gw->g.display, gw->g.x+gw->g.width/2, gw->g.y+gw->g.height/2, gw->g.width/2-1, gw->g.height/2-1, pcol->edge);
}
#endif