#include "support/lstrings.h"
#include "helper_funcs.h"
#include "debug.h"
+#include "xforms_helpers.h"
typedef FormCB<ControlMinipage, FormDB<FD_form_minipage> > base_class;
void FormMinipage::apply()
{
- string const units = fl_get_choice_text(dialog_->choice_width_units);
- double const val = strToDbl(fl_get_input(dialog_->input_width));
-
- controller().params().width =
- tostr(val) + frontStrip(strip(subst(units,"%%","%")));
+ controller().params().pageWidth =
+ LyXLength(getLengthFromWidgets(dialog_->input_width,
+ dialog_->choice_width_units));
if (fl_get_button(dialog_->radio_top))
controller().params().pos = InsetMinipage::top;
void FormMinipage::update()
{
- LyXLength len(controller().params().width);
+ LyXLength len(controller().params().pageWidth);
fl_set_input(dialog_->input_width, tostr(len.value()).c_str());
fl_set_choice(dialog_->choice_width_units, len.unit() + 1);