Implemented dialog units -> pixels conversion very close to how it's