simplify icon size calculation function slightly