mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
GuiBox.cpp: Remove some unnecessary negated logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34780 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c803547a97
commit
1541a7f756
@ -128,10 +128,10 @@ void GuiBox::on_innerBoxCO_activated(int index)
|
|||||||
heightCB->setEnabled(ibox);
|
heightCB->setEnabled(ibox);
|
||||||
// except for frameless and boxed, the width cannot be specified if
|
// except for frameless and boxed, the width cannot be specified if
|
||||||
// there is no inner box
|
// there is no inner box
|
||||||
bool const width_disabled = (!ibox && outer != "Frameless" &&
|
bool const width_enabled =
|
||||||
outer != "Boxed");
|
ibox || outer == "Frameless" || outer == "Boxed";
|
||||||
widthED->setEnabled(!width_disabled);
|
widthED->setEnabled(width_enabled);
|
||||||
widthUnitsLC->setEnabled(!width_disabled);
|
widthUnitsLC->setEnabled(width_enabled);
|
||||||
// halign is only allowed for Boxed without inner box or for makebox
|
// halign is only allowed for Boxed without inner box or for makebox
|
||||||
halignCO->setEnabled((!ibox && outer == "Boxed")
|
halignCO->setEnabled((!ibox && outer == "Boxed")
|
||||||
|| (itype == "makebox"));
|
|| (itype == "makebox"));
|
||||||
@ -167,10 +167,10 @@ void GuiBox::on_typeCO_activated(int index)
|
|||||||
}
|
}
|
||||||
// except for frameless and boxed, the width cannot be specified if
|
// except for frameless and boxed, the width cannot be specified if
|
||||||
// there is no inner box
|
// there is no inner box
|
||||||
bool const width_disabled = (itype == "none" && !frameless
|
bool const width_enabled =
|
||||||
&& type != "Boxed");
|
itype != "none" || frameless || type == "Boxed";
|
||||||
widthED->setEnabled(!width_disabled);
|
widthED->setEnabled(width_enabled);
|
||||||
widthUnitsLC->setEnabled(!width_disabled);
|
widthUnitsLC->setEnabled(width_enabled);
|
||||||
// halign is only allowed for Boxed without inner box or for makebox
|
// halign is only allowed for Boxed without inner box or for makebox
|
||||||
halignCO->setEnabled((type == "Boxed" && itype == "none") || (itype == "makebox"));
|
halignCO->setEnabled((type == "Boxed" && itype == "none") || (itype == "makebox"));
|
||||||
// pagebreak is only allowed for Boxed without inner box
|
// pagebreak is only allowed for Boxed without inner box
|
||||||
@ -264,10 +264,9 @@ void GuiBox::paramsToDialog(Inset const * inset)
|
|||||||
|
|
||||||
// except for frameless and boxed, the width cannot be specified if
|
// except for frameless and boxed, the width cannot be specified if
|
||||||
// there is no inner box
|
// there is no inner box
|
||||||
bool const width_disabled = (!ibox && !frameless
|
bool const width_enabled = (ibox || frameless || type == "Boxed");
|
||||||
&& type != "Boxed");
|
widthED->setEnabled(width_enabled);
|
||||||
widthED->setEnabled(!width_disabled);
|
widthUnitsLC->setEnabled(width_enabled);
|
||||||
widthUnitsLC->setEnabled(!width_disabled);
|
|
||||||
|
|
||||||
Length::UNIT const default_unit = Length::defaultUnit();
|
Length::UNIT const default_unit = Length::defaultUnit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user