Bug 159303 - "Dark" theme uses Adwaita Dark colour for document background in KDE Plasma, instead of system colour scheme.
Summary: "Dark" theme uses Adwaita Dark colour for document background in KDE Plasma, ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/automat...
Whiteboard:
Keywords:
Depends on:
Blocks: KDE, KF5 Options-Dialog-Colours
  Show dependency treegraph
 
Reported: 2024-01-20 18:31 UTC by Beedell, Roke Julian Lockhart
Modified: 2024-08-22 16:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Colouration configuration. (242.81 KB, image/png)
2024-05-27 16:05 UTC, Beedell, Roke Julian Lockhart
Details
Page colour with entirely automatic colouration applied. (67.09 KB, image/png)
2024-05-27 16:06 UTC, Beedell, Roke Julian Lockhart
Details
Default System Theme (Dark) Automatic Colours - Writer (242.63 KB, image/png)
2024-05-28 10:53 UTC, Beedell, Roke Julian Lockhart
Details
Page colour with "Dark" preset applied. (60.52 KB, image/png)
2024-05-28 10:54 UTC, Beedell, Roke Julian Lockhart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beedell, Roke Julian Lockhart 2024-01-20 18:31:55 UTC
Description:
As https://ask.libreoffice.org/t/automatic-system-theme-should-set-document-colour-to-theme-colours/100696/6?u=rokejulianlockhart describes, the newly-implemented automatic document dark mode doesn't utilize the colours of the system on KDE, in contrast to all other theming. It appears to utilize the default Adwaita Dark colouration instead.

Steps to Reproduce:
0.  Install cpe:/o:opensuse:tumbleweed:20240118.
1.  Install 24.2.0.2 using `sudo snap install libreoffice --channmel=latest/edge`.
2.  Configure the theme preferences to match https://ask.libreoffice.org/uploads/asklibo/original/3X/2/e/2ed20b8a0340e9f1bfe75652cf00b68951b07f5b.png - "Automatic" and "System theme".
3.  

Actual Results:
It uses arbitrary dark colouration, even with all document colours set to "Automatic".

Expected Results:
It should have utilized the colouration defined by the system.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: a8c9976b9f74750b38aab69bdb81f0722231d164
CPU threads: 12; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded
Comment 1 Buovjaga 2024-01-31 12:38:46 UTC Comment hidden (obsolete)
Comment 2 Beedell, Roke Julian Lockhart 2024-01-31 14:28:22 UTC
(In reply to Buovjaga from comment #1)
> Regarding automatic icon theme selection, there is bug 127138. Other than
> that, please describe what you are missing or what is wrong.
> 
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the information.

ilmari.lauhakangas@libreoffice.org, did you look at the URI in https://bugs.documentfoundation.org/show_bug.cgi?id=159303#c0:~:text=https%3A%2F%2Fask.libreoffice.org%2Ft%2Fautomatic-system-theme-should-set-document-colour-to-theme-colours%2F100696%2F6%3Fu%3Drokejulianlockhart ? I fail to see why you ask if so, but more specifically:

1.  https://ask.libreoffice.org/uploads/asklibo/original/3X/9/7/9750c1e2b02bc810487160792dc92f7a264efd25.png and
2.  https://ask.libreoffice.org/uploads/asklibo/original/3X/a/5/a5658def78f30dd360ba3e65b8ae8febe0c58650.png

...demonstrate what I refer to — those *document colours* are not what I've specified in `kcm_colors`, as the surrounding LibreOffice GUI colouration demonstrates. This isn't obvious when using Adwaita because the page looks the same, but it's actually an apparently static colour rather than dynamic, like the rest of the GUI. I expect it's an oversight.
Comment 3 Beedell, Roke Julian Lockhart 2024-01-31 14:29:20 UTC
(In reply to Buovjaga from comment #1)
> Regarding automatic icon theme selection, there is bug 127138.

The icon theme is correct - Breeze Dark. This has no relevance to iconography.
Comment 4 Stéphane Guillou (stragu) 2024-05-27 02:20:07 UTC
To use an example: the "Normal Background" and "View Background" colours in your KColorSchemeEditor screenshots[1][2] seem to match the "Document Background" used in the LO screenshots [3][4].

What exactly is missing since the fix for bug 149611?

[1]: https://ask.libreoffice.org/uploads/asklibo/original/3X/3/f/3f4e0c031814e2e279eada0dbae79b0591d7e0f3.png
[2]: https://ask.libreoffice.org/uploads/asklibo/original/3X/a/a/aac32f809d2f2ee4e46e103fa59d485d387dedcb.png
[3]: https://ask.libreoffice.org/uploads/asklibo/original/3X/9/7/9750c1e2b02bc810487160792dc92f7a264efd25.png
[4]: https://ask.libreoffice.org/uploads/asklibo/original/3X/a/5/a5658def78f30dd360ba3e65b8ae8febe0c58650.png
Comment 5 Beedell, Roke Julian Lockhart 2024-05-27 16:05:14 UTC Comment hidden (obsolete)
Comment 6 Beedell, Roke Julian Lockhart 2024-05-27 16:06:04 UTC Comment hidden (obsolete)
Comment 7 Beedell, Roke Julian Lockhart 2024-05-27 16:06:48 UTC Comment hidden (obsolete)
Comment 8 Beedell, Roke Julian Lockhart 2024-05-27 16:17:33 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2024-05-27 16:20:02 UTC Comment hidden (obsolete)
Comment 10 Beedell, Roke Julian Lockhart 2024-05-27 17:27:33 UTC Comment hidden (obsolete)
Comment 11 Stéphane Guillou (stragu) 2024-05-28 02:16:39 UTC Comment hidden (obsolete)
Comment 12 Beedell, Roke Julian Lockhart 2024-05-28 10:53:32 UTC
Created attachment 194394 [details]
Default System Theme (Dark) Automatic Colours - Writer
Comment 13 Beedell, Roke Julian Lockhart 2024-05-28 10:54:22 UTC
Created attachment 194395 [details]
Page colour with "Dark" preset applied.
Comment 14 Beedell, Roke Julian Lockhart 2024-05-28 10:58:53 UTC
(In reply to Stéphane Guillou (stragu) from comment #11)
> (In reply to `{third: "Beedell", first: "Roke"}`{.JSON5} from comment #7)
> > (In reply to Stéphane Guillou (stragu) from comment #4)
> > Do the uploaded screenshots answer your question?
> No, they don't on their own.
> Can you write down what you see, and what you expect instead?
> Because now you have screenshots of a light document background, whereas
> your comment 0 states:
> 
> (In reply to `{third: "Beedell", first: "Roke"}`{.JSON5} from comment #0)
> > Actual Results:
> > It uses arbitrary dark colouration, even with all document colours set to
> > "Automatic".

Indeed, you're correct. I conflated this with https://bugs.documentfoundation.org/show_bug.cgi?id=149611#c0. I've provided correct images now.

The issue at hand is that the "Dark" theme preset should still utilize the system colours for its dark theme under KDE, but instead uses hard-coded Adwaita colours, rather than acquire the dark colours from the system (irrespective of which mode the system is in, else this would be covered by "System theme".

Considering that KDE's relevant kcm_color *might* not have the concept of *default* dark and light themes yet, this might be blocked by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2567.
Comment 15 Stéphane Guillou (stragu) 2024-05-28 12:55:47 UTC
Thank you.
Seeing the screenshots, I assume you using the kf5/6 VCL plugin. (Please paste here the full version info from Help > About LibreOffice to be sure.)

@Michael, following up from bug 149611, what do you think?
Comment 16 Beedell, Roke Julian Lockhart 2024-05-28 17:18:03 UTC
(In reply to Stéphane Guillou (stragu) from comment #15)
> Thank you.
> Seeing the screenshots, I assume you using the kf5/6 VCL plugin. (Please
> paste here the full version info from Help > About LibreOffice to be sure.)

I appear to be:

Version: 24.2.3.2 (X86_64)
Build ID: 420(Build:2)
CPU threads: 12; OS: Linux 6.8; UI render: default; VCL: kf6 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 17 Michael Weghorn 2024-05-28 18:33:14 UTC
(In reply to Stéphane Guillou (stragu) from comment #15)
> Seeing the screenshots, I assume you using the kf5/6 VCL plugin. (Please
> paste here the full version info from Help > About LibreOffice to be sure.)
> 
> @Michael, following up from bug 149611, what do you think?

Sounds like a valid enhancement request to me if the configured colors are provided by some public API. (The same could apply for GTK, if - as comment 0 suggests - hard-coded colors are currently used for the light and dark themes).

Besides QPalette, which only provides a limited amount of colors, KColorScheme [1] looks relevant.

The screenshot in [2] shows kcolorschemeeditor which can e.g. be started with a command of the same name and might be very useful for experimenting/testing.

[1] https://api.kde.org/frameworks/kcolorscheme/html/classKColorScheme.html
[2] https://ask.libreoffice.org/t/automatic-system-theme-should-set-document-colour-to-theme-colours/100696
Comment 18 Michael Weghorn 2024-05-28 20:25:23 UTC
Also related: https://develop.kde.org/hig/style/color/
Comment 19 Beedell, Roke Julian Lockhart 2024-07-11 16:51:26 UTC
Despite the "Dark" theme now (at least, for me - dunno whether I modified it) using entirely "Automatic" values, the colour chosen remains that of Adwaita Dark. This is already demonstrated in https://bugs.documentfoundation.org/attachment.cgi?id=194394.