Bug 166069 - Dark mode and document color settings don't match the background of elements
Summary: Dark mode and document color settings don't match the background of elements
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LibreOffice-Themes
  Show dependency treegraph
 
Reported: 2025-04-07 13:46 UTC by enriquermcd
Modified: 2025-04-08 20:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Black baground on table of contents (131.33 KB, image/png)
2025-04-07 13:46 UTC, enriquermcd
Details
Example 1 (63.04 KB, image/png)
2025-04-08 20:52 UTC, enriquermcd
Details
Example 2 (83.82 KB, image/png)
2025-04-08 20:54 UTC, enriquermcd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description enriquermcd 2025-04-07 13:46:22 UTC
Description:
When LibreOffice is in dark mode and the document's background is manually changed to white, certain elements of the document (specifically the Table of Contents and page numbers) appear with an incorrect background color.

- Table of Contents: The background color of the Table of Contents appears black instead of transparent or matching the document background color (white).

- Page Numbers: The background of the page numbers also appears with a grey color, which is inconsistent with the rest of the document when using a white background.

Steps to Reproduce:
1. Switch to dark mode from the application’s theme settings.

2. Change the document's background color to white (using Format > Page > Background > Color).

3. Insert a Table of Contents (using Insert > Table of Contents).

4. Insert page numbers (Insert > Fields > Page Number).

Actual Results:
The Table of Contents appears with a black background.

The page numbers have a grey background.

When printing or converting the document to PDF, the background for both the Table of Contents and page numbers appears transparent, as expected.

Expected Results:
The background of the Table of Contents and page numbers should match the document background color (white or light grey) or be transparent.

The document should render consistently, with no mismatched background colors for these elements.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 12; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
25.2.2-1
Calc: threaded
Comment 1 enriquermcd 2025-04-07 13:46:45 UTC
Created attachment 200203 [details]
Black baground on table of contents
Comment 2 m_a_riosv 2025-04-07 22:36:20 UTC
Please test
-  selecting a theme other than “Automatic”, apply it and switch back to “Automatic”.
Comment 3 enriquermcd 2025-04-08 13:33:42 UTC
Yes, when I switch the theme, apply it and switch back to automatic, the the error disappears...
Comment 4 enriquermcd 2025-04-08 13:39:42 UTC
Is this the expected behavior?
Comment 5 V Stuart Foote 2025-04-08 13:55:17 UTC
Yes, and some of the lingering issues around the Appearance theme and os/DE provided Automatic color schemes are being refined further for the 25.8 release.

Follow along with other issues posted against bug 125823, or the feature rework as for bug 164970
Comment 6 V Stuart Foote 2025-04-08 13:59:28 UTC
Oh, and would add--at 25.2 users are advised to install one of the Appearance theme extensions to their liking (selected from Tools -> Options -> Appearance panel) and once applied, don't return the the 'Automatic' theme that pulls color scheme from os/DE by default.
Comment 7 enriquermcd 2025-04-08 20:51:59 UTC
Thanks for your recommendation, but to be honest the available dark themes don't seem to be as good as the "default" theme, as they have weird transitions (either non existent, example 1, or too abrupt, example 2). Probably a GNOME/Adwaita thing?

I will wait to 25.8 then if there isn't anything I can do right now to solve it :D

Is this maybe somehow related to Bug 166060 and Bug 166067 ?
Comment 8 enriquermcd 2025-04-08 20:52:39 UTC
Created attachment 200233 [details]
Example 1

No "boxes" for the settings
Comment 9 enriquermcd 2025-04-08 20:54:26 UTC
Created attachment 200234 [details]
Example 2

Upper bar has squared corners, which don't fit that good into a GNOME/Gtk/Adwaita system