remove unused MainDialog class
perform text size computation only if displayed