commit 9f3114c950a8fa77487c1b2d36a0cf6dda1b3235
Author: Richard Kimberly Heck <[email protected]>
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.
---
src/frontends/qt/GuiDocument.cpp | 16 ++++++++++++++++
src/frontends/qt/GuiDocument.h | 1 +
status.24x | 2 ++
3 files changed, 19 insertions(+)
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 8f6829184c..40588ff478 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1213,6 +1213,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()));
@@ -1963,6 +1965,19 @@ void GuiDocument::changeTrackingChanged(bool state)
}
+void GuiDocument::updateMarginLabels(int state)
+{
+ // One-sided
+ if (state == 0) {
+ marginsModule->outerL->setText(qt_("&Left:"));
+ marginsModule->innerL->setText(qt_("&Right:"));
+ // Two-sided
+ } else {
+ marginsModule->outerL->setText(qt_("&Outer:"));
+ marginsModule->innerL->setText(qt_("&Inner:"));
+ }
+}
+
void GuiDocument::slotApply()
{
bool only_shellescape_changed = !nonModuleChanged_ && !modulesChanged_;
@@ -4687,6 +4702,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 fe44411f40..8e39c3b2ee 100644
--- a/src/frontends/qt/GuiDocument.h
+++ b/src/frontends/qt/GuiDocument.h
@@ -173,6 +173,7 @@ private Q_SLOTS:
void setOutputSync(bool);
void bookmarksopenChanged(bool);
void changeTrackingChanged(bool);
+ void updateMarginLabels(int);
private:
/// validate listings parameters and return an error message, if any
QString validateListingsParameters();
diff --git a/status.24x b/status.24x
index 5333936073..9af7acfe87 100644
--- a/status.24x
+++ b/status.24x
@@ -50,6 +50,8 @@ What's new
- The document dialog now opens faster on first launch.
+- Use Right/Left or Outer/Inner for page margins, as appropriate (bug 12410).
+
* DOCUMENTATION AND LOCALIZATION
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs