github/twui — pull request #153 by luosheng (2012-12-26 09:37:57+00:00)
Title: Fix TUIButton highlighted state.

When a user clicks on a `TUIButton`, the highlighted image set by `setImage:forState:` won't display.

It's because of the `TUIControlStateHover` state introduced in commit 109c52582f8977e26024cd3e330046af1b1ae8b6. When a user's mouse is down, the TUIButton's state is now `TUIControlStateHover | TUIControlStateHighlighted`, instead of the original `TUIControlStateHighlighted`. So we will get no image for that combined state.

This is fixed by removing the `TUIControlStateHover` state when calculating the `state` value for `TUIControl` if the control is currently highlighted.