diff --git a/src/widget/button.c b/src/widget/button.c index a81ecf8..cb894c0 100644 --- a/src/widget/button.c +++ b/src/widget/button.c @@ -24,7 +24,15 @@ static void draw(MwWidget handle) { r.width = MwGetInteger(handle, MwNwidth); r.height = MwGetInteger(handle, MwNheight); - MwDrawWidgetBack(handle, &r, base, handle->pressed, MwGetInteger(handle, MwNflat) ? handle->pressed : 1); + if(MwGetInteger(handle, MwNflat)){ + if(handle->pressed){ + MwDrawWidgetBack(handle, &r, base, handle->pressed, 1); + }else{ + MwDrawRect(handle, &r, base); + } + }else{ + MwDrawWidgetBack(handle, &r, base, handle->pressed, 1); + } if(MwGetInteger(handle, MwNflat) && !handle->pressed) { r.x += MwDefaultBorderWidth(handle); r.y += MwDefaultBorderWidth(handle);