Bug 164420 - LibreOffice Light mode doesn't override system theme even when "prefer light mode" is enabled
Summary: LibreOffice Light mode doesn't override system theme even when "prefer light ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: UI-Theming
  Show dependency treegraph
 
Reported: 2024-12-21 20:42 UTC by Henrique Rodrigues
Modified: 2025-01-10 07:39 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the Lime Theme. (176.64 KB, image/png)
2024-12-27 00:14 UTC, Henrique Rodrigues
Details
screenshot-2 (242.17 KB, image/png)
2024-12-27 00:18 UTC, Henrique Rodrigues
Details
screenshot-3 (256.19 KB, image/png)
2024-12-27 00:18 UTC, Henrique Rodrigues
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henrique Rodrigues 2024-12-21 20:42:34 UTC
Description:
My Linux system have a dark theme, and when I launched LibreOffice for the first time it appeared in a dark theme. I thought that it was just using the system's theme to match, but when I checked in Tools -> Options... -> LibreOffice -> View the Mode was set to Light. And doesn't matter what I did, LibreOffice just refuses to switch to Light mode. I tried:

1. Set LibreOffice to Dark mode, click ok, restart, and set to Light mode again. (No difference).
2. I went to system's theme settings and set "prefer light mode", this option tells applications that I want to use their light theme. When I enabled this, my Firefox switched to a light theme. But it didn't work in LibreOffice.
3. Reinstall LibreOffice completely. (No difference)
4. Restart LibreOffice in safe mode. (No difference)

Steps to Reproduce:
1. Set system to a dark theme.
2. Open LibreOffice.
3. Go in Tools -> Options... -> LibreOffice -> View
4. Set Mode to 'Light'
5. Click 'Apply' then 'OK'

Actual Results:
LibreOffice does nothing.

Expected Results:
LibreOffice switches to Light theme.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
[LibreOffice Info]
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 12; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

[My system info (I hope this helps in some way)]
System:
  Kernel: 6.8.0-51-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0 clocksource: hpet
  Desktop: Cinnamon v: 6.2.9 tk: GTK v: 3.24.41 wm: Muffin v: 6.2.0 vt: 7 dm: LightDM v: 1.30.0
    Distro: Linux Mint 22 Wilma base: Ubuntu 24.04 noble

Machine:
  Type: Laptop System: LENOVO product: 82MF v: IdeaPad 3 15ALC6

CPU:
  Info: 6-core model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64 type: MT MCP smt: enabled
    arch: Zen 2 rev: 1 cache: L1: 384 KiB L2: 3 MiB L3: 8 MiB
  Speed (MHz): avg: 1092 high: 3239 min/max: 400/4056 cores: 1: 400 2: 400 3: 1397 4: 400 5: 400
    6: 400 7: 1397 8: 1877 9: 1397 10: 1397 11: 3239 12: 400 bogomips: 50307
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Comment 1 V Stuart Foote 2024-12-26 22:49:51 UTC
Major changes coming at 25.2 / 25.8 perhaps give the new 25.2.0beta2 build a test install, or a nightly against 25.8

Then poke around the Tools -> Options -> Appearance panels. There is a new extension based theming framework--with sample "Lime Theme" and "Light Application Color" in addition to the "Automatic" default theme. All will respond to the System / Light / Dark appearance radio buttons (with LibreOffice restart between each mode change).

Anyhow, that framework will be direction going forward--so helps to get more eyes on it. Have fun...

The RPM and DEB packaging for install are available here:
https://dev-builds.libreoffice.org/daily/master/
and here
https://dev-builds.libreoffice.org/daily/libreoffice-25-2/

https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 2 Henrique Rodrigues 2024-12-27 00:14:46 UTC
Created attachment 198273 [details]
Screenshot showing the Lime Theme.
Comment 3 Henrique Rodrigues 2024-12-27 00:18:30 UTC
Created attachment 198274 [details]
screenshot-2
Comment 4 Henrique Rodrigues 2024-12-27 00:18:56 UTC
Created attachment 198275 [details]
screenshot-3
Comment 5 Henrique Rodrigues 2024-12-27 00:19:16 UTC
(In reply to V Stuart Foote from comment #1)

Thank you so much for the reply, Stuart!

I installed the 25.2 version you talked about and I am so happy with it! The theme and appearance options seems to be independent of the system's settings now, and this is very good! Also, the Lime Theme is very pleasant :)

There are just some minor inconsistencies that I noticed on the theme. I left two screenshots for you showing what I mean (screenshot-2 and screenshot-3). I can't say if these are due to some configuration of the new framework you are using or it's just the theme settings that are off.

Thank you so much again for the reply!
Henrique.
Comment 6 V Stuart Foote 2024-12-27 11:10:51 UTC
(In reply to Henrique Rodrigues from comment #5)
> (In reply to V Stuart Foote from comment #1)
> 
> Thank you so much for the reply, Stuart!
> 
> I installed the 25.2 version you talked about and I am so happy with it! The
> theme and appearance options seems to be independent of the system's
> settings now, and this is very good! Also, the Lime Theme is very pleasant :)
> 
> There are just some minor inconsistencies that I noticed on the theme. I
> left two screenshots for you showing what I mean (screenshot-2 and
> screenshot-3). I can't say if these are due to some configuration of the new
> framework you are using or it's just the theme settings that are off.
> 
> Thank you so much again for the reply!
> Henrique.

Great to hear, our GSOC Intern Sahil has been digging deep on this and is pushing to get it cleaned up for the 25.2 build cycle. Full credit to him and his mentors.

If IIUC your concern is with the full dark color of the non-selected radio buttons/check boxes?

If so, believe https://gerrit.libreoffice.org/c/core/+/179410 is on tap to tweak that on the GTK back ends (use Disabled instead of Inactive color value).
Comment 7 Sahil Gautam 2024-12-28 03:23:41 UTC
(In reply to V Stuart Foote from comment #6)
> If so, believe https://gerrit.libreoffice.org/c/core/+/179410 is on tap to
> tweak that on the GTK back ends (use Disabled instead of Inactive color
> value).

That patch was for disabled buttons, https://gerrit.libreoffice.org/c/core/+/179486 this patch solves the check/radio button background not themed issue.
Comment 8 Heiko Tietze 2025-01-06 09:24:34 UTC
Learn more about the new appearance configuration at https://design.blog.documentfoundation.org/2024/12/20/libreoffice-themes-will-replace-the-color-customization/

Regarding the disabled controls having a too dark color, this should be fixed on the extension site. And the Lime Color Theme is rather for testing purpose IMO (happy you like it anyhow). 

Can we resolve this ticket as NAB?
Comment 9 Sahil Gautam 2025-01-06 09:32:16 UTC
(In reply to Heiko Tietze from comment #8)
> Regarding the disabled controls having a too dark color, this should be
> fixed on the extension site. 

It was an implementation issue, fixed it in 

https://gerrit.libreoffice.org/c/core/+/179439
https://gerrit.libreoffice.org/c/core/+/179410

review pending...
Comment 10 Commit Notification 2025-01-10 07:39:43 UTC
Sahil Gautam committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ab26bd699ad49c57ae90b44a0fe8c586845da2f4

tdf#164420 Fix unselected Check/Radio buttons not following themes in GTK

It will be available in 25.8.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.