commit ef23270b653abd5d03de09c2f3e58665ef2c7b15
Author: Koji Yokota <[email protected]>
Date: Thu Jul 10 18:33:28 2025 +0900
Adapt preedit colors to themes
---
lib/themes/Default.theme | 131 +++++++++++++++++++-----------------
lib/themes/Monochrome.theme | 131 +++++++++++++++++++-----------------
lib/themes/Solarized.theme | 131 +++++++++++++++++++-----------------
src/Color.cpp | 2 +
src/ColorCode.h | 4 ++
src/frontends/qt/ColorCache.cpp | 2 +
src/frontends/qt/GuiInputMethod.cpp | 36 +++++++---
7 files changed, 240 insertions(+), 197 deletions(-)
diff --git a/lib/themes/Default.theme b/lib/themes/Default.theme
index ca42089784..9c37f09a90 100644
--- a/lib/themes/Default.theme
+++ b/lib/themes/Default.theme
@@ -1,90 +1,95 @@
+#LyX version: 2.5.0
#
# This is a definition file of a color theme "Default" of LyX
#
+# Author: Koji Yokota
+#
# Syntax: \set_color "color name" "light color" "dark color"
#
-\set_color "error" "#ff0000" "#8b0000"
-\set_color "latex" "#8b0000" "#d66613"
-\set_color "nomlabel" "#ff6d2f" "#ff6d2f"
-\set_color "urllabel" "#0000ff" "#0000ff"
-\set_color "urltext" "#0000ff" "#86a4ff"
+\set_color "added_space" "#a52a2a" "#a52a2a"
+\set_color "appendix" "#a52a2a" "#a52a2a"
+\set_color "background" "#faf0e6" "#000000"
\set_color "bookmark" "#4169e1" "#4169e1"
-\set_color "cursor" "#000000" "#faf0e6"
-\set_color "command" "#000000" "#000000"
-\set_color "command_broken" "#ffffff" "#ffffff"
-\set_color "commandframe" "#000000" "#faf0e6"
-\set_color "commandbg" "#f0ffff" "#f0ffff"
-\set_color "commentbg" "#faf0e6" "#000000"
-\set_color "comment" "#ff00ff" "#808000"
-\set_color "scroll" "#cd5c5c" "#cd5c5c"
-\set_color "textlabel1" "#0000ff" "#86a4ff"
-\set_color "textlabel2" "#008000" "#00ff00"
-\set_color "textlabel3" "#ff00ff" "#ff00ff"
-\set_color "buttonhoverbg" "#c7c7ca" "#c7c7ca"
-\set_color "buttonhoverbg_broken" "#db0b0b" "#db0b0b"
-\set_color "preview" "#000000" "#faf0e6"
-\set_color "previewframe" "#000000" "#faf0e6"
-\set_color "listingsbg" "#ffffff" "#000000"
+\set_color "bottomarea" "#666666" "#cccccc"
+\set_color "branchlabel" "#c88000" "#c88000"
\set_color "buttonbg" "#dcd2c8" "#dcd2c8"
\set_color "commandbg_broken" "#ff0000" "#ff0000"
+\set_color "buttonhoverbg_broken" "#db0b0b" "#db0b0b"
+\set_color "buttonhoverbg" "#c7c7ca" "#c7c7ca"
\set_color "buttonframe" "#dcd2c8" "#dcd2c8"
\set_color "commandframe_broken" "#ff0000" "#ff0000"
-\set_color "mathmacrohoverbg" "#cdc3b8" "#cccccc"
-\set_color "bottomarea" "#666666" "#cccccc"
-\set_color "appendix" "#a52a2a" "#a52a2a"
-\set_color "marginlabel" "#aa55ff" "#800080"
-\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
-\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "changebar" "#0000ff" "#86a4ff"
\set_color "changedtextauthor1" "#0000ff" "#86a4ff"
\set_color "changedtextauthor2" "#ff00ff" "#ee86ee"
\set_color "changedtextauthor3" "#ff0000" "#ea8989"
\set_color "changedtextauthor4" "#aa00ff" "#c371ec"
\set_color "changedtextauthor5" "#55aa00" "#acd780"
-\set_color "changebar" "#0000ff" "#86a4ff"
+\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "addedtext" "#0000ff" "#0000ff"
\set_color "deletedtext" "#ff0000" "#ff0000"
\set_color "deletedtextmodifier" "#ffffff" "#ffffff"
-\set_color "addedtext" "#0000ff" "#0000ff"
-\set_color "insetlabel" "#000000" "#000000"
-\set_color "insetframe" "#cd5c5c" "#cd5c5c"
-\set_color "insetbg" "#cccccc" "#cccccc"
-\set_color "shaded" "#ff0000" "#f2af7d"
-\set_color "pagebreak" "#4169e1" "#4169e1"
-\set_color "mathframe" "#ff00ff" "#ff00ff"
-\set_color "mathbg" "#faf0e6" "#000000"
-\set_color "math" "#00008b" "#85f0fe"
-\set_color "mathmacronewarg" "#000000" "#faf0e6"
-\set_color "mathmacrooldarg" "#cccccc" "#666666"
-\set_color "mathmacroframe" "#ede2d8" "#000000"
-\set_color "mathmacrobg" "#ede2d8" "#000000"
-\set_color "mathmacrolabel" "#a19992" "#a19992"
-\set_color "mathmacroblend" "#000000" "#faf0e6"
-\set_color "mathcorners" "#faf0e6" "#000000"
-\set_color "mathline" "#0000ff" "#86a4ff"
-\set_color "newpage" "#0000ff" "#86a4ff"
-\set_color "foreground" "#000000" "#faf0e6"
-\set_color "regexpframe" "#008000" "#00ff00"
-\set_color "paragraphmarker" "#cccccc" "#666666"
-\set_color "branchlabel" "#c88000" "#c88000"
+\set_color "collapsibleframe" "#cd5c5c" "#cd5c5c"
+\set_color "collapsible" "#8b0000" "#8b0000"
+\set_color "command" "#000000" "#000000"
+\set_color "command_broken" "#ffffff" "#ffffff"
+\set_color "commandbg" "#f0ffff" "#f0ffff"
+\set_color "commandframe" "#000000" "#faf0e6"
+\set_color "commentbg" "#faf0e6" "#000000"
+\set_color "comment" "#ff00ff" "#808000"
+\set_color "cursor" "#000000" "#faf0e6"
+\set_color "depthbar" "#cd5c5c" "#cd5c5c"
+\set_color "eolmarker" "#a52a2a" "#a52a2a"
+\set_color "footlabel" "#00aaff" "#0000ff"
+\set_color "graphicsbg" "#faf0e6" "#000000"
\set_color "greyedoutbg" "#faf0e6" "#000000"
\set_color "greyedout" "#ff0080" "#ff0080"
\set_color "greyedouttext" "#cccccc" "#666666"
-\set_color "special" "#4169e1" "#4169e1"
-\set_color "graphicsbg" "#faf0e6" "#000000"
-\set_color "collapsible" "#8b0000" "#8b0000"
-\set_color "collapsibleframe" "#cd5c5c" "#cd5c5c"
-\set_color "added_space" "#a52a2a" "#a52a2a"
\set_color "indexlabel" "#008000" "#008080"
-\set_color "background" "#faf0e6" "#000000"
-\set_color "footlabel" "#00aaff" "#0000ff"
\set_color "inlinecompletion" "#999999" "#666666"
\set_color "nonuniqueinlinecompletion" "#cccccc" "#999999"
-\set_color "eolmarker" "#a52a2a" "#a52a2a"
-\set_color "tabularonoffline" "#b0c4de" "#23497b"
-\set_color "tabularline" "#000000" "#faf0e6"
+\set_color "insetbg" "#cccccc" "#cccccc"
+\set_color "insetframe" "#cd5c5c" "#cd5c5c"
+\set_color "insetlabel" "#000000" "#000000"
\set_color "language" "#0000ff" "#86a4ff"
+\set_color "error" "#ff0000" "#8b0000"
+\set_color "latex" "#8b0000" "#d66613"
+\set_color "listingsbg" "#ffffff" "#000000"
+\set_color "marginlabel" "#aa55ff" "#800080"
+\set_color "mathbg" "#faf0e6" "#000000"
+\set_color "mathcorners" "#faf0e6" "#000000"
+\set_color "mathframe" "#ff00ff" "#ff00ff"
+\set_color "mathline" "#0000ff" "#86a4ff"
+\set_color "mathmacrobg" "#ede2d8" "#000000"
+\set_color "mathmacroblend" "#000000" "#faf0e6"
+\set_color "mathmacroframe" "#ede2d8" "#000000"
+\set_color "mathmacrohoverbg" "#cdc3b8" "#cccccc"
+\set_color "mathmacrolabel" "#a19992" "#a19992"
+\set_color "mathmacronewarg" "#000000" "#faf0e6"
+\set_color "mathmacrooldarg" "#cccccc" "#666666"
+\set_color "math" "#00008b" "#85f0fe"
+\set_color "newpage" "#0000ff" "#86a4ff"
+\set_color "nomlabel" "#ff6d2f" "#ff6d2f"
\set_color "notebg" "#ffff00" "#5b5903"
\set_color "note" "#ffff00" "#ff6200"
-\set_color "selection" "#add8e6" "#add8e6"
-\set_color "selectiontext" "#000000" "#000000"
+\set_color "pagebreak" "#4169e1" "#4169e1"
+\set_color "paragraphmarker" "#cccccc" "#666666"
+\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
+\set_color "preeditfocus" "#add8e6" "#add8e6"
+\set_color "preeditfocustext" "#000000" "#000000"
+\set_color "previewframe" "#000000" "#faf0e6"
+\set_color "preview" "#000000" "#faf0e6"
+\set_color "regexpframe" "#008000" "#00ff00"
+\set_color "scroll" "#cd5c5c" "#cd5c5c"
\set_color "selectionmath" "#00008b" "#00008b"
-\set_color "depthbar" "#cd5c5c" "#cd5c5c"
+\set_color "selectiontext" "#000000" "#000000"
+\set_color "selection" "#add8e6" "#add8e6"
+\set_color "shaded" "#ff0000" "#f2af7d"
+\set_color "special" "#4169e1" "#4169e1"
+\set_color "tabularline" "#000000" "#faf0e6"
+\set_color "tabularonoffline" "#b0c4de" "#23497b"
+\set_color "foreground" "#000000" "#faf0e6"
+\set_color "textlabel1" "#0000ff" "#86a4ff"
+\set_color "textlabel2" "#008000" "#00ff00"
+\set_color "textlabel3" "#ff00ff" "#ff00ff"
+\set_color "urllabel" "#0000ff" "#0000ff"
+\set_color "urltext" "#0000ff" "#86a4ff"
diff --git a/lib/themes/Monochrome.theme b/lib/themes/Monochrome.theme
index 256796c366..46e8874625 100644
--- a/lib/themes/Monochrome.theme
+++ b/lib/themes/Monochrome.theme
@@ -1,90 +1,95 @@
+#LyX version: 2.5.0
#
# This is a definition file of a color theme "Monochrome" of LyX
#
+# Author: Koji Yokota
+#
# Syntax: \set_color "color name" "light color" "dark color"
#
-\set_color "error" "#e60004" "#8b0000"
-\set_color "latex" "#0000cd" "#8080ff"
-\set_color "nomlabel" "#cd5725" "#cd5726"
-\set_color "urllabel" "#0000cd" "#8080ff"
-\set_color "urltext" "#0000cd" "#86a4ff"
+\set_color "added_space" "#0000cd" "#8080ff"
+\set_color "appendix" "#0000cd" "#8080ff"
+\set_color "background" "#fbfbfb" "#333334"
\set_color "bookmark" "#4169e1" "#4169e1"
-\set_color "cursor" "#191919" "#e0e0e0"
-\set_color "command" "#191919" "#e0e0e0"
-\set_color "command_broken" "#f2f2f2" "#ffffff"
-\set_color "commandframe" "#cccccc" "#e0e0e0"
-\set_color "commandbg" "#cccccc" "#333334"
-\set_color "commentbg" "#fcfcca" "#666600"
-\set_color "comment" "#272727" "#e0e0e0"
-\set_color "scroll" "#cd5c5c" "#cd6768"
-\set_color "textlabel1" "#0000cd" "#86a4ff"
-\set_color "textlabel2" "#008000" "#86c086"
-\set_color "textlabel3" "#9a009a" "#ff80ff"
-\set_color "buttonhoverbg" "#cdcdcd" "#575759"
-\set_color "buttonhoverbg_broken" "#be0a0d" "#410304"
-\set_color "preview" "#191919" "#e0e0e0"
-\set_color "previewframe" "#191919" "#faf0e6"
-\set_color "listingsbg" "#fafafa" "#333334"
+\set_color "bottomarea" "#f2f2f2" "#333334"
+\set_color "branchlabel" "#c88000" "#c88000"
\set_color "buttonbg" "#e6e6e6" "#454547"
\set_color "commandbg_broken" "#d90004" "#400001"
+\set_color "buttonhoverbg_broken" "#be0a0d" "#410304"
+\set_color "buttonhoverbg" "#cdcdcd" "#575759"
\set_color "buttonframe" "#d8d8d8" "#333334"
\set_color "commandframe_broken" "#d80004" "#400001"
-\set_color "mathmacrohoverbg" "#cdc3b8" "#454547"
-\set_color "bottomarea" "#f2f2f2" "#333334"
-\set_color "appendix" "#0000cd" "#8080ff"
-\set_color "marginlabel" "#aa55ff" "#800080"
-\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
-\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "changebar" "#0000cd" "#8080ff"
\set_color "changedtextauthor1" "#0000cd" "#86a4ff"
\set_color "changedtextauthor2" "#d800d8" "#ee86ee"
\set_color "changedtextauthor3" "#da0004" "#ea8989"
\set_color "changedtextauthor4" "#aa00ff" "#c371ec"
\set_color "changedtextauthor5" "#468b00" "#acd780"
-\set_color "changebar" "#0000cd" "#8080ff"
+\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "addedtext" "#0000cd" "#8080ff"
\set_color "deletedtext" "#d90004" "#ff6668"
\set_color "deletedtextmodifier" "#f2f2f2" "#7b7b7e"
-\set_color "addedtext" "#0000cd" "#8080ff"
-\set_color "insetlabel" "#191919" "#e0e0e0"
-\set_color "insetframe" "#d8006c" "#995b7a"
-\set_color "insetbg" "#d8006c" "#410020"
-\set_color "shaded" "#6666ff" "#6666ff"
-\set_color "pagebreak" "#0000cd" "#8080ff"
-\set_color "mathframe" "#000080" "#8080ff"
-\set_color "mathbg" "#fbfbfb" "#333334"
-\set_color "math" "#000080" "#aeaefa"
-\set_color "mathmacronewarg" "#191919" "#faf0e6"
-\set_color "mathmacrooldarg" "#cccccc" "#666666"
-\set_color "mathmacroframe" "#ede2d8" "#333334"
-\set_color "mathmacrobg" "#fbfbfb" "#333334"
-\set_color "mathmacrolabel" "#a19992" "#a19992"
-\set_color "mathmacroblend" "#191919" "#faf0e6"
-\set_color "mathcorners" "#000080" "#8080ff"
-\set_color "mathline" "#0000cd" "#8080ff"
-\set_color "newpage" "#0000cd" "#86a4ff"
-\set_color "foreground" "#191919" "#e0e0e0"
-\set_color "regexpframe" "#008000" "#00b200"
-\set_color "paragraphmarker" "#cccccc" "#666666"
-\set_color "branchlabel" "#c88000" "#c88000"
+\set_color "collapsibleframe" "#999999" "#646467"
+\set_color "collapsible" "#272727" "#e0e0e0"
+\set_color "command" "#191919" "#e0e0e0"
+\set_color "command_broken" "#f2f2f2" "#ffffff"
+\set_color "commandbg" "#cccccc" "#333334"
+\set_color "commandframe" "#cccccc" "#e0e0e0"
+\set_color "commentbg" "#fcfcca" "#666600"
+\set_color "comment" "#272727" "#e0e0e0"
+\set_color "cursor" "#191919" "#e0e0e0"
+\set_color "depthbar" "#0000ff" "#8080ff"
+\set_color "eolmarker" "#0000cd" "#8080ff"
+\set_color "footlabel" "#0076b1" "#8080ff"
+\set_color "graphicsbg" "#fbfbfb" "#333334"
\set_color "greyedoutbg" "#cccccc" "#333334"
\set_color "greyedout" "#191919" "#e0e0e0"
\set_color "greyedouttext" "#cccccc" "#666666"
-\set_color "special" "#0000cd" "#8080ff"
-\set_color "graphicsbg" "#fbfbfb" "#333334"
-\set_color "collapsible" "#272727" "#e0e0e0"
-\set_color "collapsibleframe" "#999999" "#646467"
-\set_color "added_space" "#0000cd" "#8080ff"
\set_color "indexlabel" "#006700" "#5fbebe"
-\set_color "background" "#fbfbfb" "#333334"
-\set_color "footlabel" "#0076b1" "#8080ff"
\set_color "inlinecompletion" "#999999" "#666666"
\set_color "nonuniqueinlinecompletion" "#cccccc" "#999999"
-\set_color "eolmarker" "#0000cd" "#8080ff"
-\set_color "tabularonoffline" "#999999" "#999999"
-\set_color "tabularline" "#272727" "#faf0e6"
+\set_color "insetbg" "#d8006c" "#410020"
+\set_color "insetframe" "#d8006c" "#995b7a"
+\set_color "insetlabel" "#191919" "#e0e0e0"
\set_color "language" "#0000ff" "#8080ff"
+\set_color "error" "#e60004" "#8b0000"
+\set_color "latex" "#0000cd" "#8080ff"
+\set_color "listingsbg" "#fafafa" "#333334"
+\set_color "marginlabel" "#aa55ff" "#800080"
+\set_color "mathbg" "#fbfbfb" "#333334"
+\set_color "mathcorners" "#000080" "#8080ff"
+\set_color "mathframe" "#000080" "#8080ff"
+\set_color "mathline" "#0000cd" "#8080ff"
+\set_color "mathmacrobg" "#fbfbfb" "#333334"
+\set_color "mathmacroblend" "#191919" "#faf0e6"
+\set_color "mathmacroframe" "#ede2d8" "#333334"
+\set_color "mathmacrohoverbg" "#cdc3b8" "#454547"
+\set_color "mathmacrolabel" "#a19992" "#a19992"
+\set_color "mathmacronewarg" "#191919" "#faf0e6"
+\set_color "mathmacrooldarg" "#cccccc" "#666666"
+\set_color "math" "#000080" "#aeaefa"
+\set_color "newpage" "#0000cd" "#86a4ff"
+\set_color "nomlabel" "#cd5725" "#cd5726"
\set_color "notebg" "#fdfdca" "#666600"
\set_color "note" "#272727" "#e0e0e0"
-\set_color "selection" "#cccccc" "#999999"
-\set_color "selectiontext" "#272727" "#000000"
+\set_color "pagebreak" "#0000cd" "#8080ff"
+\set_color "paragraphmarker" "#cccccc" "#666666"
+\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
+\set_color "preeditfocus" "#cccccc" "#999999"
+\set_color "preeditfocustext" "#272727" "#000000"
+\set_color "previewframe" "#191919" "#faf0e6"
+\set_color "preview" "#191919" "#e0e0e0"
+\set_color "regexpframe" "#008000" "#00b200"
+\set_color "scroll" "#cd5c5c" "#cd6768"
\set_color "selectionmath" "#00008b" "#0000cd"
-\set_color "depthbar" "#0000ff" "#8080ff"
+\set_color "selectiontext" "#272727" "#000000"
+\set_color "selection" "#cccccc" "#999999"
+\set_color "shaded" "#6666ff" "#6666ff"
+\set_color "special" "#0000cd" "#8080ff"
+\set_color "tabularline" "#272727" "#faf0e6"
+\set_color "tabularonoffline" "#999999" "#999999"
+\set_color "foreground" "#191919" "#e0e0e0"
+\set_color "textlabel1" "#0000cd" "#86a4ff"
+\set_color "textlabel2" "#008000" "#86c086"
+\set_color "textlabel3" "#9a009a" "#ff80ff"
+\set_color "urllabel" "#0000cd" "#8080ff"
+\set_color "urltext" "#0000cd" "#86a4ff"
diff --git a/lib/themes/Solarized.theme b/lib/themes/Solarized.theme
index 54572787ba..c0b43091e6 100644
--- a/lib/themes/Solarized.theme
+++ b/lib/themes/Solarized.theme
@@ -1,90 +1,95 @@
+#LyX version: 2.5.0
#
# This is a definition file of a color theme "Solarized" of LyX
#
+# Author: Koji Yokota
+#
# Syntax: \set_color "color name" "light color" "dark color"
#
-\set_color "error" "#ff0000" "#8b0000"
-\set_color "latex" "#657b83" "#839496"
-\set_color "nomlabel" "#ff6d2f" "#ff6d2f"
-\set_color "urllabel" "#657b83" "#839496"
-\set_color "urltext" "#657b83" "#839496"
+\set_color "added_space" "#2aa198" "#2aa198"
+\set_color "appendix" "#dc322f" "#dc322f"
+\set_color "background" "#fdf6e3" "#002b36"
\set_color "bookmark" "#4169e1" "#4169e1"
-\set_color "cursor" "#657b83" "#839496"
-\set_color "command" "#2aa198" "#2aa198"
-\set_color "command_broken" "#ffffff" "#ffffff"
-\set_color "commandframe" "#93a1a1" "#586e75"
-\set_color "commandbg" "#eee8d5" "#073642"
-\set_color "commentbg" "#eee8d5" "#073642"
-\set_color "comment" "#ff00ff" "#808000"
-\set_color "scroll" "#cd5c5c" "#cd5c5c"
-\set_color "textlabel1" "#0000ff" "#86a4ff"
-\set_color "textlabel2" "#008000" "#00ff00"
-\set_color "textlabel3" "#ff00ff" "#ff00ff"
-\set_color "buttonhoverbg" "#eee8d5" "#073642"
-\set_color "buttonhoverbg_broken" "#db0b0b" "#db0b0b"
-\set_color "preview" "#657b83" "#839496"
-\set_color "previewframe" "#657b83" "#839496"
-\set_color "listingsbg" "#268bd2" "#268bd2"
+\set_color "bottomarea" "#666666" "#cccccc"
+\set_color "branchlabel" "#c88000" "#c88000"
\set_color "buttonbg" "#fdf6e3" "#002b36"
\set_color "commandbg_broken" "#ff0000" "#ff0000"
+\set_color "buttonhoverbg_broken" "#db0b0b" "#db0b0b"
+\set_color "buttonhoverbg" "#eee8d5" "#073642"
\set_color "buttonframe" "#93a1a1" "#586e75"
\set_color "commandframe_broken" "#ff0000" "#ff0000"
-\set_color "mathmacrohoverbg" "#cdc3b8" "#cccccc"
-\set_color "bottomarea" "#666666" "#cccccc"
-\set_color "appendix" "#dc322f" "#dc322f"
-\set_color "marginlabel" "#aa55ff" "#800080"
-\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
-\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "changebar" "#4d4d4c" "#4d4d4c"
\set_color "changedtextauthor1" "#2aa198" "#2aa198"
\set_color "changedtextauthor2" "#d33682" "#d33682"
\set_color "changedtextauthor3" "#cf4b16" "#cf4b16"
\set_color "changedtextauthor4" "#b58900" "#b58900"
\set_color "changedtextauthor5" "#859900" "#859900"
-\set_color "changebar" "#4d4d4c" "#4d4d4c"
+\set_color "changedtextcomparison" "#008080" "#719fb0"
+\set_color "addedtext" "#8b0000" "#8b0000"
\set_color "deletedtext" "#ff0000" "#ff0000"
\set_color "deletedtextmodifier" "#ffffff" "#ffffff"
-\set_color "addedtext" "#8b0000" "#8b0000"
-\set_color "insetlabel" "#191919" "#000000"
-\set_color "insetframe" "#93a1a1" "#586e75"
-\set_color "insetbg" "#cccccc" "#cccccc"
-\set_color "shaded" "#dc322f" "#dc322f"
-\set_color "pagebreak" "#268bd2" "#268bd2"
-\set_color "mathframe" "#657b83" "#839496"
-\set_color "mathbg" "#fdf6e3" "#002b36"
-\set_color "math" "#657b83" "#839496"
-\set_color "mathmacronewarg" "#657b83" "#839496"
-\set_color "mathmacrooldarg" "#cccccc" "#666666"
-\set_color "mathmacroframe" "#eee8d5" "#073642"
-\set_color "mathmacrobg" "#eee8d5" "#073642"
-\set_color "mathmacrolabel" "#a19992" "#a19992"
-\set_color "mathmacroblend" "#657b83" "#839496"
-\set_color "mathcorners" "#eee8d5" "#073642"
-\set_color "mathline" "#657b83" "#839496"
-\set_color "newpage" "#2aa198" "#2aa198"
-\set_color "foreground" "#657b83" "#839496"
-\set_color "regexpframe" "#008000" "#00ff00"
-\set_color "paragraphmarker" "#8abeb7" "#8abeb7"
-\set_color "branchlabel" "#c88000" "#c88000"
+\set_color "collapsibleframe" "#eee8d5" "#073642"
+\set_color "collapsible" "#d0caff" "#d0caff"
+\set_color "command" "#2aa198" "#2aa198"
+\set_color "command_broken" "#ffffff" "#ffffff"
+\set_color "commandbg" "#eee8d5" "#073642"
+\set_color "commandframe" "#93a1a1" "#586e75"
+\set_color "commentbg" "#eee8d5" "#073642"
+\set_color "comment" "#ff00ff" "#808000"
+\set_color "cursor" "#657b83" "#839496"
+\set_color "depthbar" "#2aa198" "#2aa198"
+\set_color "eolmarker" "#2aa198" "#2aa198"
+\set_color "footlabel" "#6c71c4" "#6c71c4"
+\set_color "graphicsbg" "#eee8d5" "#073642"
\set_color "greyedoutbg" "#eee8d5" "#073642"
\set_color "greyedout" "#ff0080" "#ff0080"
\set_color "greyedouttext" "#cccccc" "#666666"
-\set_color "special" "#81a2be" "#81a2be"
-\set_color "graphicsbg" "#eee8d5" "#073642"
-\set_color "collapsible" "#d0caff" "#d0caff"
-\set_color "collapsibleframe" "#eee8d5" "#073642"
-\set_color "added_space" "#2aa198" "#2aa198"
\set_color "indexlabel" "#008000" "#008080"
-\set_color "background" "#fdf6e3" "#002b36"
-\set_color "footlabel" "#6c71c4" "#6c71c4"
\set_color "inlinecompletion" "#93a1a1" "#586e75"
\set_color "nonuniqueinlinecompletion" "#93a1a1" "#586e75"
-\set_color "eolmarker" "#2aa198" "#2aa198"
-\set_color "tabularonoffline" "#93a1a1" "#586e75"
-\set_color "tabularline" "#657b83" "#839496"
+\set_color "insetbg" "#cccccc" "#cccccc"
+\set_color "insetframe" "#93a1a1" "#586e75"
+\set_color "insetlabel" "#191919" "#000000"
\set_color "language" "#657b83" "#839496"
+\set_color "error" "#ff0000" "#8b0000"
+\set_color "latex" "#657b83" "#839496"
+\set_color "listingsbg" "#268bd2" "#268bd2"
+\set_color "marginlabel" "#aa55ff" "#800080"
+\set_color "mathbg" "#fdf6e3" "#002b36"
+\set_color "mathcorners" "#eee8d5" "#073642"
+\set_color "mathframe" "#657b83" "#839496"
+\set_color "mathline" "#657b83" "#839496"
+\set_color "mathmacrobg" "#eee8d5" "#073642"
+\set_color "mathmacroblend" "#657b83" "#839496"
+\set_color "mathmacroframe" "#eee8d5" "#073642"
+\set_color "mathmacrohoverbg" "#cdc3b8" "#cccccc"
+\set_color "mathmacrolabel" "#a19992" "#a19992"
+\set_color "mathmacronewarg" "#657b83" "#839496"
+\set_color "mathmacrooldarg" "#cccccc" "#666666"
+\set_color "math" "#657b83" "#839496"
+\set_color "newpage" "#2aa198" "#2aa198"
+\set_color "nomlabel" "#ff6d2f" "#ff6d2f"
\set_color "notebg" "#eee8d5" "#073642"
\set_color "note" "#268bd2" "#268bd2"
-\set_color "selection" "#93a1a1" "#586e75"
-\set_color "selectiontext" "#fdf6e3" "#002b36"
+\set_color "pagebreak" "#268bd2" "#268bd2"
+\set_color "paragraphmarker" "#8abeb7" "#8abeb7"
+\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
+\set_color "preeditfocus" "#93a1a1" "#586e75"
+\set_color "preeditfocustext" "#fdf6e3" "#002b36"
+\set_color "previewframe" "#657b83" "#839496"
+\set_color "preview" "#657b83" "#839496"
+\set_color "regexpframe" "#008000" "#00ff00"
+\set_color "scroll" "#cd5c5c" "#cd5c5c"
\set_color "selectionmath" "#eaeaff" "#00008b"
-\set_color "depthbar" "#2aa198" "#2aa198"
+\set_color "selectiontext" "#fdf6e3" "#002b36"
+\set_color "selection" "#93a1a1" "#586e75"
+\set_color "shaded" "#dc322f" "#dc322f"
+\set_color "special" "#81a2be" "#81a2be"
+\set_color "tabularline" "#657b83" "#839496"
+\set_color "tabularonoffline" "#93a1a1" "#586e75"
+\set_color "foreground" "#657b83" "#839496"
+\set_color "textlabel1" "#0000ff" "#86a4ff"
+\set_color "textlabel2" "#008000" "#00ff00"
+\set_color "textlabel3" "#ff00ff" "#ff00ff"
+\set_color "urllabel" "#657b83" "#839496"
+\set_color "urltext" "#657b83" "#839496"
diff --git a/src/Color.cpp b/src/Color.cpp
index b07fc5dd1d..f757219df1 100644
--- a/src/Color.cpp
+++ b/src/Color.cpp
@@ -266,6 +266,8 @@ ColorSet::ColorSet()
{ Color_selection, N_("selection"), "selection", "#add8e6", "#add8e6",
"selection" },
{ Color_selectionmath, N_("selected math"), "selectionmath", "#00008B",
"#00008B", "selectionmath" },
{ Color_selectiontext, N_("selected text"), "selectiontext", black,
black, "selectiontext" },
+ { Color_preeditfocus, N_("preedit focus background"), "preeditfocus",
"#add8e6", "#add8e6", "preeditfocus" },
+ { Color_preeditfocustext, N_("preedit focus text"), "preeditfocustext",
black, black, "preeditfocustext" },
{ Color_latex, N_("LaTeX text"), "latex", DarkRed, "#D66613", "latex" },
{ Color_textlabel1, N_("Text label 1"), "textlabel1", blue, "#86a4ff",
"textlabel1" },
{ Color_textlabel2, N_("Text label 2"), "textlabel2", Green, green,
"textlabel2" },
diff --git a/src/ColorCode.h b/src/ColorCode.h
index 773b9cfc6b..8cd3e9cc62 100644
--- a/src/ColorCode.h
+++ b/src/ColorCode.h
@@ -69,6 +69,10 @@ enum ColorCode {
Color_selectionmath,
/// Foreground color of selected text
Color_selectiontext,
+ /// Background color of the focused segment of the preedit
+ Color_preeditfocus,
+ /// Text color of the focused segment of the preedit
+ Color_preeditfocustext,
/// Text color in LaTeX mode
Color_latex,
/// The color used for previews
diff --git a/src/frontends/qt/ColorCache.cpp b/src/frontends/qt/ColorCache.cpp
index 5bb8523e17..bf95d974c8 100644
--- a/src/frontends/qt/ColorCache.cpp
+++ b/src/frontends/qt/ColorCache.cpp
@@ -43,10 +43,12 @@ QPalette::ColorRole role(ColorCode col)
break;
case Color_selection:
+ case Color_preeditfocus:
return QPalette::Highlight;
break;
case Color_selectionmath:
case Color_selectiontext:
+ case lyx::Color_preeditfocustext:
return QPalette::HighlightedText;
break;
case Color_urllabel:
diff --git a/src/frontends/qt/GuiInputMethod.cpp
b/src/frontends/qt/GuiInputMethod.cpp
index fea5536737..f20fbb7a6f 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -25,6 +25,7 @@
#include "InsetList.h"
#include "KeyMap.h"
#include "LyX.h"
+#include "LyXRC.h"
#include "Row.h"
#include "Text.h"
#include "TextMetrics.h"
@@ -391,8 +392,8 @@ void GuiInputMethod::setPreeditStyle(
QTextCharFormat & focus_char_format =
d->style_.segments_[focusedSegmentIndex()].char_format_;
if (d->style_.segments_.size() > 1) {
- QBrush
fgbrush(guiApp->colorCache().get(Color_selectiontext));
- QBrush
bgbrush(guiApp->colorCache().get(Color_selection));
+ QBrush
fgbrush(guiApp->colorCache().get(Color_preeditfocustext));
+ QBrush
bgbrush(guiApp->colorCache().get(Color_preeditfocus));
focus_char_format.setForeground(fgbrush);
focus_char_format.setBackground(bgbrush);
}
@@ -456,6 +457,16 @@ pos_type GuiInputMethod::setTextFormat(const
QInputMethodEvent::Attribute & it,
char_format.setFontUnderline(true);
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ // set the style of a focused sector as specified by color themes
+ // it uses a system color if "Use system colors" is checked
+ if (char_format.background().color() != QColorConstants::Black) {
+ QBrush
fgbrush(guiApp->colorCache().get(Color_preeditfocustext));
+ QBrush bgbrush(guiApp->colorCache().get(Color_preeditfocus));
+ char_format.setForeground(fgbrush);
+ char_format.setBackground(bgbrush);
+ }
+#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// The void "cursor segment" in the composing mode comes with it.start
> 0 and
// it.length == 0, whose info we don't use, so it does not go in if's
below
@@ -477,7 +488,10 @@ pos_type GuiInputMethod::setTextFormat(const
QInputMethodEvent::Attribute & it,
// push the constructed char format together with start
and length
// to the list
LYXERR(Debug::GUI, "Pushing to preedit register: (" <<
it.start
- << ", " << it.start + it.length - 1 << ") bg
color: "
+ << ", " << it.start + it.length - 1
+ << ") fg: "
+ << char_format.foreground().color().name()
+ << " bg: "
<< char_format.background().color().name());
next_seg_pos =
registerSegment(it.start, (size_type)it.length,
char_format);
@@ -504,16 +518,21 @@ pos_type GuiInputMethod::pickNextSegFromTurnout(pos_type
next_seg_pos,
for (auto past_attr = d->seg_turnout_.begin();
past_attr != d->seg_turnout_.end(); past_attr++) {
if ((*past_attr).start_ == next_seg_pos) {
+ PreeditSegment seg;
if (cf != nullptr) {
- (*past_attr).char_format_.merge(*cf);
- }
- PreeditSegment seg = {(*past_attr).start_,
+ cf->merge((*past_attr).char_format_);
+ seg = {(*past_attr).start_,
+
(size_type)(*past_attr).length_, *cf};
+ } else
+ seg = {(*past_attr).start_,
(size_type)(*past_attr).length_,
(*past_attr).char_format_};
LYXERR(Debug::GUI,
"Pushing to preedit register: (" <<
(*past_attr).start_
<< ", " << (*past_attr).start_ +
(*past_attr).length_ - 1
- << ") bg color: "
+ << ") fg: "
+ <<
(*past_attr).char_format_.foreground().color().name()
+ << " bg: "
<<
(*past_attr).char_format_.background().color().name());
d->style_.segments_.push_back(seg);
next_seg_pos += (*past_attr).length_;
@@ -585,7 +604,8 @@ void
GuiInputMethod::conformToSurroundingFont(QTextCharFormat & char_format) {
char_format.setFontItalic(!surrounding_font.italic());
// set font color
- if (char_format.foreground().style() == Qt::NoBrush) {
+ if (!lyxrc.use_system_colors &&
+ char_format.foreground().style() == Qt::NoBrush) {
ColorCache cc;
char_format.setForeground(
cc.get(d->cur_->real_current_font.fontInfo().realColor(),
false));
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs