refactored menu creation
added borderwidth in dialog
added border width test and bugfix