widget: Simplify button rendering interface.

Converted some functions to member functions.