Bug 155745 - In Libre Writer the 'typing cursor' and 'I bar' need improved contrast to Application Color "Document background"
Summary: In Libre Writer the 'typing cursor' and 'I bar' need improved contrast to App...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mouse-Cursor Text-Cursor Options-Dialog-Colours
  Show dependency treegraph
 
Reported: 2023-06-09 01:55 UTC by Davn_n1
Modified: 2023-07-07 13:07 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Text cursor light - dark cross over at 50% grey. Win10 in os/DE dark mode. (6.28 MB, image/gif)
2023-06-27 13:30 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davn_n1 2023-06-09 01:55:54 UTC
Description:
The 'typing cursor' and 'I bar' (what the mouse pointer changes into when you move it over the document) are very faint and hard to see if you set your background to anything other than white. This is especially annoying when you set the Libre Writer to dark mode and have the background colour a shade of grey. The reason I do this is because my main display is an OLED monitor and it's a bad idea to have an OLED sit on white for hours on end as this will lead to my monitor having pretty severe burn in over time.

All the solutions I have seen for this problem always tells people to just alter the cursor settings in Windows settings. However for some reason this does not work for libre writer, I change the cursor width and set up coloured indicators on the cursor, but they do not show up or do anything for the cursor in Libre Writer.

Actual Results:
Go to 'tools' then 'options' then 'application colours' and change 'document background' to colour '#7B7B7B'. 

Expected Results:
Changed document background colour to a darkish grey, then you should notice the 'typing cursor' and 'I bar' are quite faint and hard to see.


Reproducible: Always


User Profile Reset: No

Additional Info:
Allow me to change the colour and size of both the 'typing cursor' and 'I bar'.

I'm using Windows 11 Pro.
Comment 1 Dieter 2023-06-25 10:41:08 UTC
I confirm it with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 069c7dc4e9706b40ca12d83d83f90f41cec948f8
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Steps:
1. Tools -> Options -> LibreOffice -> Application Colours
2. Change colour of dicument background to #7B7B7B
3. Write some wrds and plac cursor behind a word and move with mouse or touchpad over document

Actual result
Cursor almost unvisible

Expected result
Cursor should be visible

So for me it's a valid enhancemnet request, but I add design-team to find a solution here.
Comment 2 V Stuart Foote 2023-06-25 17:04:22 UTC
The text cursor does toggle color in response Application Colors 'Document background' set.  Easier to see the effect if the document background is selected across the range of the Standard palette's gray scale.

It is not the size or shape of the text cursor (and do not think we need to follow any os/DE settings cross platform).

Rather, issue is that the transition of text cursor's gray scale color against background color does not auto-adjust well and you *can* end up with "invisible" Grey cursor on Grey 'Document background' and similar low contrast values around the gray-scale mid-range.

Suggests there should be a test of text cursor contrast against document background for auto-adjust. 

Also in addition to contrast testing for automatic values, I would love to be able to directly set the text cursor and pointer color as Application color elements.
Comment 3 Heiko Tietze 2023-06-26 12:11:42 UTC
Not adjusting the cursor color depending on the background is a bug. I wonder if Hossein's latest patch does something good here too. See bug 122970 (and bug 155943 as follow-up to-do).
Comment 4 Heiko Tietze 2023-06-26 12:13:31 UTC
(In reply to V Stuart Foote from comment #2)
> The text cursor does toggle color in response Application Colors 'Document
> background' set.
Does it? Same greyish color on black document background as on white.
Comment 5 V Stuart Foote 2023-06-27 13:30:31 UTC
Created attachment 188108 [details]
Text cursor light - dark cross over at 50% grey. Win10 in os/DE dark mode.

(In reply to Heiko Tietze from comment #4)
> (In reply to V Stuart Foote from comment #2)
> > The text cursor does toggle color in response Application Colors 'Document
> > background' set.
> Does it? Same greyish color on black document background as on white.

Yes. See the attached--the cross over happens at the 50% grey. And where the cursor disappears into the canvas.  There is no contrast testing of cursor fg against canvas bg.
Comment 6 Heiko Tietze 2023-07-03 15:16:53 UTC
Obviously a bug probably caused by XOR rendering (see bug 122970) that fails at this particular value.
Comment 7 Hossein 2023-07-04 08:37:21 UTC
(In reply to Heiko Tietze from comment #3)
> Not adjusting the cursor color depending on the background is a bug. I
> wonder if Hossein's latest patch does something good here too. See bug
> 122970 (and bug 155943 as follow-up to-do).
The above bug (tdf#122970) is related. The way LibreOffice renders the typing cursor using XOR is problematic, and should be changed in a similar way. But the fix (or a separate patch) should also take care of the specific colors used for the typing cursor.

(In reply to Heiko Tietze from comment #6)
> Obviously a bug probably caused by XOR rendering (see bug 122970) that fails
> at this particular value.
Yes, this is a bug. I think using the typing cursor provided by the OS/graphical back-end is the way to go. There are customization like the arrow that shows the direction of the writing inside text with different direction. They might be implemented similar to the way suggested in tdf#155943 through OS/back-end provided means. Might not be straightforward. These are not visible with Skia right now anyway.