- fl_set_choice (dialog_->choice_space_above, 7);
- setEnabled(dialog_->input_space_above, true);
- setEnabled(dialog_->choice_value_space_above, true);
- string const default_unit = "cm";
- string const length = par_->params().spaceTop().length().asString();
- updateWidgetsFromLengthString(dialog_->input_space_above,
- dialog_->choice_value_space_above,
- length, default_unit);
+ fl_set_choice (dialog_->choice_space_above, 7);
+ setEnabled(dialog_->input_space_above, true);
+ setEnabled(dialog_->choice_value_space_above, true);
+ bool const metric = lyxrc.default_papersize > 3;
+ string const default_unit = metric ? "cm" : "in";
+ string const length = par_->params().spaceTop().length().asString();
+ updateWidgetsFromLengthString(dialog_->input_space_above,
+ dialog_->choice_value_space_above,
+ length, default_unit);