diff options
-rw-r--r-- | src/tk/check.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tk/check.c b/src/tk/check.c index e425467..fd23b6a 100644 --- a/src/tk/check.c +++ b/src/tk/check.c @@ -88,7 +88,7 @@ _mftk_check_layout(struct mftk_widget *w) mftk_widget_layout(c->label); } - w->w = c->butn_width + c->butn_border; + w->w = c->butn_width + c->butn_border * 2; if (c->label != NULL) { w->w += c->label_padding + c->label->w; } @@ -240,8 +240,8 @@ _mftk_check_render(struct mftk_widget *w, SDL_Renderer *renderer, int x, int y) render = &_mftk_check_render_cir; } - rect.x = x - c->butn_border; - rect.y = y - c->butn_border; + rect.x = x; + rect.y = y; rect.w = c->butn_width + c->butn_border * 2; rect.h = c->butn_width + c->butn_border * 2; if (w->focused == SDL_TRUE) { @@ -253,10 +253,10 @@ _mftk_check_render(struct mftk_widget *w, SDL_Renderer *renderer, int x, int y) e = -1; } - rect.x = x; - rect.y = y; - rect.w = c->butn_width; - rect.h = c->butn_width; + rect.x += c->butn_border; + rect.y += c->butn_border; + rect.w -= c->butn_border * 2; + rect.h -= c->butn_border * 2; if (render(&rect, &_mftk_check_butn_color, renderer) < 0) { e = -1; } |