ui/dropdown: updated centering calculation and made width getters