I've attached a patch that uses fine dots rather than dashes as spellcheck marks.

I found the current marks a bit too distracting (there are always words in my documents that I don't want to add to the spell checker). It's clearly subjective but maybe you share my subjective experience.

The dots are actually round (see screen shot) but since anti-aliasing is turned off for the underline (due to performance?) they might appear of unequal shape at lower/normal zoom. Alternatively, I could make them into small boxes rather than dots.

Daniel
From a64f84419309d99cdbf23ac7c9e5ec4fe01a9a92 Mon Sep 17 00:00:00 2001
From: Daniel Ramoeller <d....@web.de>
Date: Tue, 30 Oct 2018 14:08:23 +0100
Subject: [PATCH] Use (less flashy) fine dots for continous spellcheck
 underline.

---
 src/RowPainter.cpp               | 2 +-
 src/frontends/Painter.h          | 3 ++-
 src/frontends/qt4/GuiPainter.cpp | 8 ++++++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 43b3be20ce..8359ac4e8b 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -237,7 +237,7 @@ void RowPainter::paintMisspelledMark(Row::Element const & 
e) const
 
                pi_.pain.line(int(x_ + x1), y, int(x_ + x2), y,
                              Color_error,
-                             Painter::line_onoffdash, thickness);
+                             Painter::line_finedots, thickness);
                pos = range.last + 1;
        }
 }
diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h
index 17253b2f44..a136e506bd 100644
--- a/src/frontends/Painter.h
+++ b/src/frontends/Painter.h
@@ -58,7 +58,8 @@ public:
                line_solid, //< solid line
                line_solid_aliased, //< solid line, no anti-aliasing (used as a
                                    // workaround to painting issues)
-               line_onoffdash //< dashes with spaces
+               line_onoffdash, //< dashes with spaces
+               line_finedots //< fine dots
        };
 
        /// possible fill styles
diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp
index 8bd9efbe17..ade58ecfbc 100644
--- a/src/frontends/qt4/GuiPainter.cpp
+++ b/src/frontends/qt4/GuiPainter.cpp
@@ -75,6 +75,14 @@ void GuiPainter::setQPainterPen(QColor const & col,
                pen.setStyle(Qt::SolidLine); break;
        case line_onoffdash:
                pen.setStyle(Qt::DotLine); break;
+       case line_finedots:
+               QVector<qreal> dashes;
+
+               dashes << .1 << 2;
+
+               pen.setDashPattern(dashes);
+               pen.setStyle(Qt::CustomDashLine);
+               pen.setCapStyle(Qt::RoundCap); break;
        }
 
        pen.setWidth(lw);
-- 
2.17.0.windows.1

Reply via email to