client: fix UI issues with buttons

 * fix hover state getting stuck after clicking a button. closes #166
 * fix clicking buttons clearing the selection. closes #183
 * minor code style cleanups