commit d9524321d757e26dbd2139592dfe1c59a1ef001f
Author: Guillaume Munch <[email protected]>
Date: Wed Dec 2 21:56:10 2015 +0000
Simplify Unicode symbols for old systems
(http://mid.gmane.org/[email protected])
Fix the pilcrow and the cross in the outliner for Windows and old Ubuntus.
The thin space after the cross is based on aesthetics (in Ubuntu at least)
after
trying both with and without a normal space. A thin space is already used
for
display in BiblioInfo.cpp, so I presume it is safe.
Ideally, I prefer ❌ (CROSS MARK), whose description fits the purpose, over ✖
(HEAVY MULTIPLICATION X), which looks too bold in the UI. Whereas ✕
(MULTIPLICATION X, successfully tested in Windows by Andrew) looks too dim.
But
❌ (CROSS MARK) is next to ❎ (NEGATIVE SQUARED CROSS MARK) so it might be as
problematic as the latter.
Do not output the cross on the author name in the toc of tracked changes.
diff --git a/src/Changes.cpp b/src/Changes.cpp
index df4a376..832ccac 100644
--- a/src/Changes.cpp
+++ b/src/Changes.cpp
@@ -486,23 +486,24 @@ void Changes::addToToc(DocIterator const & cdit, Buffer
const & buffer,
case Change::UNCHANGED:
continue;
case Change::DELETED:
- // 0x2702 is a scissors symbol in the Dingbats unicode
group.
+ // ✂ U+2702 BLACK SCISSORS
str.push_back(0x2702);
break;
case Change::INSERTED:
- // 0x270d is the hand writting symbol in the Dingbats
unicode group.
- str.push_back(0x270d); break;
+ // ✍ U+270D WRITING HAND
+ str.push_back(0x270d);
+ break;
}
dit.pos() = it->range.start;
Paragraph const & par = dit.paragraph();
str += " " + par.asString(it->range.start, min(par.size(),
it->range.end));
if (it->range.end > par.size())
- // the end of paragraph symbol from the Punctuation
group
- str.push_back(0x204B);
+ // ¶ U+00B6 PILCROW SIGN
+ str.push_back(0xb6);
docstring const & author =
author_list.get(it->change.author).name();
Toc::iterator it = change_list->item(0, author);
if (it == change_list->end()) {
- change_list->push_back(TocItem(dit, 0, author,
output_active));
+ change_list->push_back(TocItem(dit, 0, author, true));
change_list->push_back(TocItem(dit, 1, str,
output_active,
support::wrapParas(str, 4)));
continue;
diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp
index 8e90a3b..e47ca9b 100644
--- a/src/TocBackend.cpp
+++ b/src/TocBackend.cpp
@@ -68,14 +68,12 @@ docstring const & TocItem::tooltip() const
docstring const TocItem::asString() const
{
- // U+2327 X IN A RECTANGLE BOX
- // char_type const cross = 0x2327;
- // U+274E NEGATIVE SQUARED CROSS MARK
- char_type const cross = 0x274e;
+ static char_type const cross = 0x2716; // ✖ U+2716 HEAVY MULTIPLICATION
X
+ static char_type const thin = 0x2009; // U+2009 THIN SPACE
docstring prefix;
if (!output_) {
prefix += cross;
- prefix += " ";
+ prefix += thin;
}
return prefix + str_;
}
diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 5a278f9..6c78d44 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -84,6 +84,8 @@ docstring InsetBranch::toolTip(BufferView const & bv, int,
int) const
docstring const InsetBranch::buttonLabel(BufferView const & bv) const
{
+ static char_type const tick = 0x2714; // ✔ U+2714 HEAVY CHECK MARK
+ static char_type const cross = 0x2716; // ✖ U+2716 HEAVY MULTIPLICATION
X
docstring s = _("Branch: ") + params_.branch;
Buffer const & realbuffer = *buffer().masterBuffer();
BranchList const & branchlist = realbuffer.params().branchlist();
@@ -103,9 +105,9 @@ docstring const InsetBranch::buttonLabel(BufferView const &
bv) const
}
bool const master_selected = isBranchSelected();
bool const child_selected = isBranchSelected(true);
- docstring symb = docstring(1, char_type(master_selected ? 0x2714 :
0x2716));
+ docstring symb = docstring(1, master_selected ? tick : cross);
if (inchild && master_selected != child_selected)
- symb += char_type(child_selected ? 0x2714 : 0x2716);
+ symb += child_selected ? tick : cross;
if (decoration() == InsetLayout::CLASSIC)
return symb + (isOpen(bv) ? s : getNewLabel(s));
else