preferences.js: improve the dialog layout