added a method to change the width of UI elements.