#include "qt_helpers.h"
#include "Validator.h"
-#include "LyXRC.h" // to set the default length values
#include "Spacing.h"
#include "FuncRequest.h"
connect(unitCO, SIGNAL(selectionChanged(lyx::Length::UNIT)),
this, SLOT(change_adaptor()));
- valueLE->setValidator(unsignedLengthValidator(valueLE));
+ valueLE->setValidator(unsignedGlueLengthValidator(valueLE));
// Manage the ok, apply, restore and cancel/close buttons
bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy);
// initialize the length validator
bc().addCheckedLineEdit(valueLE, valueL);
-
- // remove the %-items from the unit choice
- unitCO->noPercents();
}
spacing->setCurrentIndex(item);
keep->setChecked(space.keep());
- Length::UNIT default_unit =
- (lyxrc.default_papersize > 3) ? Length::CM : Length::IN;
+ Length::UNIT const default_unit = Length::defaultUnit();
bool const custom_vspace = space.kind() == VSpace::LENGTH;
if (custom_vspace) {
value->setEnabled(true);