Fixed window resize/move event bug & DRY on selected tab colour.