Move padding to local variable

Also only add extraPadding if width change is needed.