Bug 152845 - no visible AutoText preview in high contrast mode (Windows)
Summary: no visible AutoText preview in high contrast mode (Windows)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0
Keywords: accessibility
Depends on:
Blocks: High-Contrast AutoText
  Show dependency treegraph
 
Reported: 2023-01-02 16:46 UTC by Stéphane Guillou (stragu)
Modified: 2023-02-01 19:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Default high contrast mode on Windows 10 with LO 7.5.0.1 (49.60 KB, image/png)
2023-01-02 16:46 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-01-02 16:46:46 UTC
Created attachment 184452 [details]
Default high contrast mode on Windows 10 with LO 7.5.0.1

Steps:
0. Turn on OS high contrast mode
1. Open Writer
2. Tools > AutoText
3. Select an AutoText from the collection

Result:
Preview is not visible on the right-hand side.

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

Version 7.4 on Windows still had black text on white bakground for the preview, so wasn't an issue then.

Not an issue on Linux with GNOME 3.36.8.

Caolán, you might be interested.
Comment 1 V Stuart Foote 2023-01-02 17:57:35 UTC
Confirmed, Win10 with each of the 3 of the 4 predefined HC modes. 

The Win10 "High Contrast White" mode the example auto text is fully readable.

But, the dialog should perform some sort of fg/bg toggle as needed to make the example auto text visible.
Comment 2 Rafael Lima 2023-01-09 12:11:28 UTC
The problem here also applies to dark mode in Linux as well. For instance, if you choose the LibreOffice Dark color scheme under Tools - Options - Application Colors, you'll notice the same problem.

It seems here that the preview background uses the correct DOCCOLOR but the font used is stuck in black.

Tested with

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 25d8ecf729bc11cc46faef380e39dcc81000cefc
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 3 Caolán McNamara 2023-01-09 13:22:44 UTC
Yeah, I'm looking into it. Basically the font is always black unless there is a "Window" attached to the document and there isn't in this case, which requires a bit of restructuring to get this working without accidentally making printing/pdf export use the on-screen font color which we don't want to happen.
Comment 4 Commit Notification 2023-02-01 19:32:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0eaad910442a1bbb0c6a89a8887322ea3d6906e0

Resolves: tdf#152845 AutoText preview not readable in high contrast mode

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Caolán McNamara 2023-02-01 19:37:12 UTC
wrt #2 the color used in the LibreOffice Dark scheme for Text Document field colors is probably still not great in combination with a dark background and light text color.

But the general case should work now.