Bug 155399 - Writer shows incorrect colors on fillable form elements when system UI is set to dark mode
Summary: Writer shows incorrect colors on fillable form elements when system UI is set...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Form-Controls Dark-Mode
  Show dependency treegraph
Reported: 2023-05-19 04:49 UTC by andrew.hakman
Modified: 2023-08-13 20:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Form text boxes (18.54 KB, application/vnd.oasis.opendocument.text)
2023-08-13 20:30 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description andrew.hakman 2023-05-19 04:49:23 UTC
I'm running Libre Office in Linux under KDE. I have the system theme set to Breeze Dark.
Opening a previously created writer document that has form elements in it, with the KDE theme set to dark mode, ALL of the form text boxes have a dark grey background and light gray text, even though the main part of the document is normal (black text on a white background).

There are really 4 bugs here:

1) I can't select ALL of the form elements and change them at once. I can only select one form element at a time, and have to change them individually. This is REALLY painful.

2) Why does the background color and font color of form elements default to some color from the system color scheme when the non-form parts of the document work normally?

3) To fix the background, I can simply change the color and pick "white" instead of "default", but to fix the font color, it's actually set to "black" the first time I open the font dialog, but the text is picking a different color from the UI color scheme. To actually change it to be black, I have to change it to a color other than black, press OK, then re-open the font dialog a second time, and set it back to "black" again - then it actually changes.

4) The border colors of the form elements also got changed from black to a lighter color from the color scheme too.

Form elements shouldn't default to random colors from the UI theme when the rest of the document doesn't do that.

Form elements should be multi-selectible and be able to mass edit common parameters of them (such as colors, appearance, fonts, etc.) all at one time.

There's also a long-standing bug with form elements that are set to "centered" text. When I open a saved file, the text is not centered, but way off to the right of the form box. If I type an extra space at the end of the text, then the text centers properly. It will remain centered until I save, and re-open the document in a new session - then it's back to not being centered correctly again.

All of these bugs (form element colors, and text alignment) affects the final rendering of the document - if I export a PDF, I get the incorrect colors and alignments as well until I manually fix all of them.

Steps to Reproduce:
1.Create a document with forms with the color scheme set normally - put some text in the forms and set them to "centered" - save the document, and close Writer
2.Change the system UI to dark mode and re-open the saved document

Actual Results:
Form fields have incorrect colors and text alignment

Expected Results:
Form fields maintain colors consistent with the rest of the document regardless of UI color schemes. Text alignment of text fields set to "centered" is actually centered.

Reproducible: Always

User Profile Reset: No

Additional Info:
Please add more unit tests to form fields in writer - there have been a number of weird issues with forms in the last number of versions, so clearly there isn't enough testing being done to ensure forms are working properly.
Comment 1 Stéphane Guillou (stragu) 2023-05-19 22:18:17 UTC
Thanks for the report, Andrew.

Can you please:
- test again with version 7.5. A lot of dark mode improvements made it into that version: https://www.libreoffice.org/download/download/
- if you see the same issue
   - share an example document and screenshots as attachments here. That helps contributors test and see exactly what the issue looks like.
   - share the version information copied from Help > About LibreOffice

Thank you!
Comment 2 Timur 2023-08-13 20:30:42 UTC
Created attachment 188955 [details]
Form text boxes

This report was not precise enough, but let me reuse it to confirm a bug for a specific issue I saw in Ubuntu 22.04 dark mode:
multi line with formatting text box form element appears black when system UI is dark.