move scale ui code to directive and use top padding to fit to height