From a6db1383f5dc1a8647ec3b28e0bc3671a8afd376 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 10 Mar 2022 13:35:45 +0100 Subject: [PATCH] Get rid of spelling and language marks in info inset 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 | 1 + src/insets/InsetInfo.cpp | 7 +++++++ src/insets/InsetInfo.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 606765f965..32a0af3996 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -622,6 +622,7 @@ InsetLayout Info EndHTMLStyle HTMLTag span MultiPar false + SpellCheck false End InsetLayout Info:menu diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 65b0d1285f..f29f983c4a 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -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) { diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h index 3cfdec1d3c..244f15340b 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -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; ///