The cursor is actually hard to see when its color matches the color of its background. Maybe the idea of setting the cursor color fixed should be abandoned and inverted colors should be used instead. All writer apps I know of do so (like Libre and MS). Attached is a quick patch that seems to achieve this.

Daniel
From 8f7334e9978458285a73a4ba25b37d6761569b3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ram=C3=83=3F=3F=C3=83=3F=C3=82=C2=B6ller?=
 <d....@web.de>
Date: Mon, 17 Oct 2016 01:21:01 +0200
Subject: [PATCH] Use inverted color for cursor.

---
 src/frontends/qt4/GuiWorkArea.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp 
b/src/frontends/qt4/GuiWorkArea.cpp
index 31df06b..7116989 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -149,6 +149,10 @@ public:
                int r = rect_.right() - x_;
                int bot = rect_.bottom();
 
+               // set inverted color
+               color_ = QColor(0xff, 0xff, 0xff);
+               
painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
+
                // draw vertical line
                painter.fillRect(x_, y, cursor_width_, rect_.height(), color_);
 
-- 
2.9.0.windows.1

Reply via email to