From 365b7ac7027c4f99353eaf486daf7b53e9805ba4 Mon Sep 17 00:00:00 2001 From: Matt Brejza Date: Thu, 14 Jul 2016 00:26:44 +0100 Subject: [PATCH] fixing ellipse button drawing --- src/gwin/gwin_button.c | 4 ++-- 1 file 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