Bug 161302 - Add dark mode for VCL gen UI
Summary: Add dark mode for VCL gen UI
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Linux-Dark-Mode
  Show dependency treegraph
 
Reported: 2024-05-28 10:22 UTC by Hossein
Modified: 2024-12-09 13:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2024-05-28 10:22:03 UTC
Description:
While using LibreOffice in dark mode with VCL gen UI, the document is shown in dark, but UI widgets are drawn the same as light mode.

Steps to Reproduce:
1. Run LibreOffice in gen mode. You can use:
$ SAL_USE_VCLPLUGIN=gen libreoffice24.2 --writer

2. In "Tools > Options > Application Colors" choose "Dark" and then press "OK".

Actual Results:
Document content is shown in dark, but UI widgets are shown in light.

Expected Results:
UI widgets should also be shown in dark.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2024-06-12 13:23:49 UTC
There is no "Appearance" section in Tools > Options > LibreOffice > View, so it looks deliberate that there is no support.
I think this is where it's hidden depending on VCL plugin: https://opengrok.libreoffice.org/xref/core/cui/source/options/optgdlg.cxx#622
The icon theme does not switch either if my desktop environment is in dark mode.

Even if I switch the Application Colors scheme to "Automatic - System theme", the document background remains white.

(In reply to Hossein from comment #0)
> 2. In "Tools > Options > Application Colors" choose "Dark" and then press
> "OK".
> 
> Actual Results:
> Document content is shown in dark, but UI widgets are shown in light.
> 
> Expected Results:
> UI widgets should also be shown in dark.
I see the same, but I don't agree it's expected that the UI would follow the Application Colors scheme (as opposed to the other way around).

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5a75414d1772d1fd998f405e3b9bd80b1f10c51f
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Stéphane Guillou (stragu) 2024-06-13 06:09:42 UTC
Caolán, seeing that gen was excluded from getting the switch in f7c03364e24da285ea95cea0cc688a7a120fc163 for bug 153229, what's your opinion?
Comment 3 Buovjaga 2024-06-24 15:14:46 UTC
I don't see this as relevant. gen is a fallback UI that normal users shouldn't see. Then it would not provide value for testers to add this.
Comment 4 Hossein 2024-12-09 13:15:43 UTC
(In reply to Buovjaga from comment #3)
> I don't see this as relevant. gen is a fallback UI that normal users
> shouldn't see. Then it would not provide value for testers to add this.
Why not?
I see at least two important use cases:

1. Testing the dark mode related aspects of GUI
2. Testing the dark mode in rendered text via UITests

Beyond that, I myself use it beyond testing for various reasons, including the fact that it is more suitable for displays with 2x/3x scaling on Linux.
Comment 5 Buovjaga 2024-12-09 13:24:13 UTC
(In reply to Hossein from comment #4)
> (In reply to Buovjaga from comment #3)
> > I don't see this as relevant. gen is a fallback UI that normal users
> > shouldn't see. Then it would not provide value for testers to add this.
> Why not?
> I see at least two important use cases:
> 
> 1. Testing the dark mode related aspects of GUI

But that would not be any different than with the other UIs. What would be the added value?

> 2. Testing the dark mode in rendered text via UITests

How is this done?
Comment 6 Hossein 2024-12-09 13:35:25 UTC
(In reply to Buovjaga from comment #5)
> (In reply to Hossein from comment #4)
> > 1. Testing the dark mode related aspects of GUI
> But that would not be any different than with the other UIs. What would be
> the added value?
I assume that in gen UI, it is more straightforward, as you don't have to deal with widget toolkits. Therefore, it can be a good playground for testing.

Also, it can help separate LO-specific dark them issues from toolkit-specific issues.

> > 2. Testing the dark mode in rendered text via UITests
> How is this done?
Just normal UITests, and querying the colors from the UI. I see that there are currently tests that are done via LOKit:

commit  2bacabc61f0b9b21523d7e77371cf29228a9a394
Author: Caolán McNamara <caolan.mcnamara@collabora.com>

    add a test to detect incorrect text color in dark mode chart rendering