ImageButton: Clean up state handling code.
Button: Use the same state handling logic with ImageButton.