[LyX/master] Mark inverted branch insets
Yuriy Skalko
yuriy.skalko at gmail.com
Tue Oct 26 21:32:52 UTC 2021
commit 54028c3eea9bdba9f4f851eb339933b1e8e1cfec
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Thu Oct 21 12:56:05 2021 +0300
Mark inverted branch insets
---
lib/doc/UserGuide.lyx | 14 ++++++++++++--
src/insets/InsetBranch.cpp | 6 ++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx
index b3e93e8..123c09a 100644
--- a/lib/doc/UserGuide.lyx
+++ b/lib/doc/UserGuide.lyx
@@ -35523,8 +35523,18 @@ There are also inverted branch insets, whose content is output just in case
\emph on
not
\emph default
- activated.
- This make it easy to add alternative text for different versions of a document.
+ activated
+\change_inserted 244031559 1635284375
+ (they are marked with ~ before the name)
+\change_unchanged
+.
+
+\change_deleted 244031559 1635284383
+This
+\change_inserted 244031559 1635284385
+Such insets
+\change_unchanged
+ make it easy to add alternative text for different versions of a document.
To control whether a particular inset is inverted, right-click on the inset
button and choose
\family sans
diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 95f7ba9..66cc6ef 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -112,8 +112,10 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const
if (inchild && master_selected != child_selected)
symb += (child_selected ? tick : cross);
+ docstring inv_symb = from_ascii(params_.inverted ? "~" : "");
+
if (decoration() == InsetDecoration::MINIMALISTIC)
- return symb + params_.branch;
+ return symb + inv_symb + params_.branch;
docstring s;
if (inmaster && inchild)
@@ -124,7 +126,7 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const
s = _("Branch (master): ");
else // !inmaster && !inchild
s = _("Branch (undefined): ");
- s += params_.branch;
+ s += inv_symb + params_.branch;
return symb + s;
}
More information about the lyx-cvs
mailing list