commit f73b86132c02025860e0ccf448aa86f8c363e3a5
Author: Pavel Sanda <[email protected]>
Date: Tue Oct 1 20:34:42 2024 +0200
PDF options: reflect in UI mutually exclusive colorlinks and frames.
Backport 601abfe9291.
---
src/frontends/qt/GuiDocument.cpp | 12 ++++++++++++
src/frontends/qt/GuiDocument.h | 1 +
src/frontends/qt/ui/PDFSupportUi.ui | 3 +++
status.24x | 4 ++++
4 files changed, 20 insertions(+)
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 11d8f53cd9..635a6d59a2 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1762,6 +1762,8 @@ GuiDocument::GuiDocument(GuiView & lv)
this, SLOT(change_adaptor()));
connect(pdfSupportModule->pdfborderCB, SIGNAL(toggled(bool)),
this, SLOT(change_adaptor()));
+ connect(pdfSupportModule->colorlinksCB, SIGNAL(toggled(bool)),
+ this, SLOT(colorlinksCB_adaptor(bool)));
connect(pdfSupportModule->colorlinksCB, SIGNAL(toggled(bool)),
this, SLOT(change_adaptor()));
connect(pdfSupportModule->backrefCO, SIGNAL(activated(int)),
@@ -3088,6 +3090,12 @@ void GuiDocument::classChanged_adaptor()
}
+void GuiDocument::colorlinksCB_adaptor(bool enabled)
+{
+ pdfSupportModule->pdfborderCB->setEnabled(!enabled);
+}
+
+
void GuiDocument::classChanged()
{
int idx = latexModule->classCO->currentIndex();
@@ -4732,6 +4740,10 @@ void GuiDocument::paramsToDialog()
pdfSupportModule->pdfusetitleCB->setChecked(pdf.pdfusetitle);
pdfSupportModule->colorlinksCB->setChecked(pdf.colorlinks);
+ //hyperref considers colorlinks to be mutually exlusive to borders
+ //for workaround see manuals
+ pdfSupportModule->pdfborderCB->setEnabled(!pdf.colorlinks);
+
nn = findToken(backref_opts, pdf.backref);
if (nn >= 0)
pdfSupportModule->backrefCO->setCurrentIndex(nn);
diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h
index acb7c91b17..a1dc0275ca 100644
--- a/src/frontends/qt/GuiDocument.h
+++ b/src/frontends/qt/GuiDocument.h
@@ -133,6 +133,7 @@ private Q_SLOTS:
void browseMaster();
void classChanged();
void classChanged_adaptor();
+ void colorlinksCB_adaptor(bool);
void languagePackageChanged(int);
void biblioChanged();
void rescanBibFiles();
diff --git a/src/frontends/qt/ui/PDFSupportUi.ui
b/src/frontends/qt/ui/PDFSupportUi.ui
index b3ea170e31..df274ebd24 100644
--- a/src/frontends/qt/ui/PDFSupportUi.ui
+++ b/src/frontends/qt/ui/PDFSupportUi.ui
@@ -281,6 +281,9 @@
</item>
<item>
<widget class="QCheckBox" name="colorlinksCB">
+ <property name="toolTip">
+ <string>Mutually exclusive with frames around links, see
manual.</string>
+ </property>
<property name="text">
<string>C&olor links</string>
</property>
diff --git a/status.24x b/status.24x
index 8dba672be7..f2bc03ad67 100644
--- a/status.24x
+++ b/status.24x
@@ -31,6 +31,10 @@ What's new
the outliner, even of they do not have a label yet. In the latter
case, a label is autonatically inserted.
+- Document PDF settings allow color links and frames around them.
+ These two settings are mutually exclusive by default and we signal
+ that within UI now. Workarounds can be found our and hyperref manual.
+
* DOCUMENTATION AND LOCALIZATION
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs