[LyX/2.5.x] Fix custom color preset in dialog

Juergen Spitzmueller spitz at lyx.org
Mon Feb 23 16:22:22 UTC 2026


commit 886204397ad58bcfc9beca5cc3525c61ad2998be
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Feb 23 13:44:53 2026 +0100

    Fix custom color preset in dialog
    
    (cherry picked from commit 9571e9ffaa65007f5c09ffddd711421b7bf16752)
---
 src/frontends/qt/GuiDocument.cpp | 3 +--
 status.25x                       | 5 ++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 67fb6c90b4..2669aa4bba 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -5761,8 +5761,7 @@ void GuiDocument::toggleCustomColor(QTreeWidgetItem * item, int)
 	if (sel_color.isEmpty())
 		return;
 
-	docstring current_index = qstring_to_ucs4(sel_color);
-	QColor const initial(item->text(1));
+	QColor const initial(custom_colors_[sel_color]);
 	QColor ncol = GuiDialog::getColor(initial, this);
 	if (!ncol.isValid())
 		return;
diff --git a/status.25x b/status.25x
index 7019b25767..7ac494ecc4 100644
--- a/status.25x
+++ b/status.25x
@@ -28,7 +28,8 @@ What's new
 
 * USER INTERFACE
 
-
+-  Enable dark/light mode preference setting on Linux.
+   This is supported at least for QT_QPA_PLATFORMTHEME=gtk3 (bug 12224).
 
 * DOCUMENTATION AND LOCALIZATION
 
@@ -53,6 +54,8 @@ What's new
 
 - Do not allow to split InsetArgument which does not make sense.
 
+- Fix initial value of custom color dialog.
+
 
 
 * INTERNALS


More information about the lyx-cvs mailing list