commit ad8c4279140e70a5f45aa82b0d8ed86ae56844db Author: Richard Kimberly Heck <rikih...@lyx.org> Date: Tue Mar 25 20:16:34 2025 -0400
Fix bug #12420. Use Right/Left or Outer/Inner for page margins, as appropriate. Patch from Racoon. (cherry picked from commit 9f3114c950a8fa77487c1b2d36a0cf6dda1b3235) --- src/frontends/qt/GuiDocument.cpp | 16 ++++++++++++++++ src/frontends/qt/GuiDocument.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index f3688a4a67..1fc402980f 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1202,6 +1202,8 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(change_adaptor())); connect(pageLayoutModule->facingPagesCB, SIGNAL(clicked()), this, SLOT(change_adaptor())); + connect(pageLayoutModule->facingPagesCB, SIGNAL(stateChanged(int)), + this, SLOT(updateMarginLabels(int))); connect(pageLayoutModule->pagestyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor())); @@ -1999,6 +2001,19 @@ void GuiDocument::changeTrackingChanged(bool state) } +void GuiDocument::updateMarginLabels(int state) +{ + if (state == 0) { + // Two-sided + marginsModule->outerL->setText(qt_("&Left:")); + marginsModule->innerL->setText(qt_("&Right:")); + } else { + // Two-sided + marginsModule->outerL->setText(qt_("&Outer:")); + marginsModule->innerL->setText(qt_("&Inner:")); + } +} + void GuiDocument::slotApply() { bool only_shellescape_changed = !nonModuleChanged_ && !modulesChanged_; @@ -4724,6 +4739,7 @@ void GuiDocument::paramsToDialog() pageLayoutModule->facingPagesCB->setChecked( bp_.sides == TwoSides); + updateMarginLabels(pageLayoutModule->facingPagesCB->checkState()); lengthToWidgets(pageLayoutModule->paperwidthLE, pageLayoutModule->paperwidthUnitCO, bp_.paperwidth, default_unit); diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h index 522c89bf8f..6c23795b58 100644 --- a/src/frontends/qt/GuiDocument.h +++ b/src/frontends/qt/GuiDocument.h @@ -183,6 +183,7 @@ private Q_SLOTS: void renameCustomColor(); void alterCustomColor(); void toggleCustomColor(QTreeWidgetItem *, int); + void updateMarginLabels(int); private: /// validate listings parameters and return an error message, if any QString validateListingsParameters(); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs