Updating active and focus state of buttons