]> git.lyx.org Git - lyx.git/commitdiff
Get rid of spelling and language marks in info inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 10 Mar 2022 12:35:45 +0000 (13:35 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 10 Mar 2022 12:35:45 +0000 (13:35 +0100)
These are just annoying. Note that the language mark cannot currently
be specified in a layout file, but it is not clear that there is a
need for that. Therefore I used the simple and hackish way.

lib/layouts/stdinsets.inc
src/insets/InsetInfo.cpp
src/insets/InsetInfo.h

index 606765f9657dcf0b695c1a8e663c9e44d297b7e9..32a0af3996f118e95b2663e61291f85a90d98343 100644 (file)
@@ -622,6 +622,7 @@ InsetLayout Info
        EndHTMLStyle
        HTMLTag               span
        MultiPar              false
+       SpellCheck            false
 End
 
 InsetLayout Info:menu
index 65b0d1285f52a889362aec7c40956945ea338a1e..f29f983c4ae643f6e854d5b728cdd4ea2b0b4df3 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "frontends/Application.h"
 
+#include "support/Changer.h"
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/docstream.h"
@@ -779,6 +780,12 @@ void InsetInfo::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
+void InsetInfo::draw(PainterInfo & pi, int x, int y) const
+{
+       Changer chg = changeVar(lyxrc.mark_foreign_language, false);
+       InsetCollapsible::draw(pi, x, y);
+}
+
 void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
 
 {
index 3cfdec1d3cff7d6fdff14d33a163b1b947ffb6d4..244f15340b4f07043b89e97a9579e3feb37818b3 100644 (file)
@@ -203,7 +203,11 @@ public:
        void setInfo(std::string const & info);
        ///
        void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
+       ///
        void metrics(MetricsInfo & mi, Dimension & dim) const override;
+       ///
+       void draw(PainterInfo & pi, int x, int y) const override;
+
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const override;
        ///