[LyX/master] A slightly more elegant display of viewer programs

Juergen Spitzmueller spitz at lyx.org
Sun Feb 22 15:34:06 UTC 2026


commit 5724ec35faa2fed285e49a68a1bd73f4d8697503
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Feb 22 16:32:33 2026 +0100

    A slightly more elegant display of viewer programs
---
 src/frontends/qt/GuiPrefs.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 787133507a..f41ade621e 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -3101,7 +3101,11 @@ namespace {
 					cmds.end();
 			for (; sit != sen; ++sit) {
 				QString const qcmd = toqstr(*sit);
-				combo->addItem(qcmd, qcmd);
+				// if we have options, only display them in tooltip
+				QString const gui = qcmd.split(" ").first();
+				combo->addItem(gui, qcmd);
+				if (qcmd != gui)
+					combo->setItemData(combo->count() - 1, qcmd, Qt::ToolTipRole);
 			}
 		}
 	}


More information about the lyx-cvs mailing list