Bug 160159 - Spellchecking dialog's main textfield background color does not update on light/dark mode switching (Linux)
Summary: Spellchecking dialog's main textfield background color does not update on lig...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:24.8.0 target:24.2.3 target:7.6.8
Keywords:
Depends on:
Blocks: Spell-Checking-Dialog Options-Dialog-Colours Linux-Dark-Mode
  Show dependency treegraph
 
Reported: 2024-03-11 21:46 UTC by Jeff Fortin Tam
Modified: 2024-04-23 18:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Video demonstration (837.52 KB, video/webm)
2024-03-11 21:47 UTC, Jeff Fortin Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2024-03-11 21:46:05 UTC
Description:
Please see the attached video.

Steps to Reproduce:
1. Open the spellchecking dialog (F7 key)
2. Switch between light/dark operating system color scheme preference

Actual Results:
Lingering background color

Expected Results:
Updated background color


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Jeff Fortin Tam 2024-03-11 21:47:54 UTC
Created attachment 193069 [details]
Video demonstration
Comment 2 Jeff Fortin Tam 2024-03-11 22:50:39 UTC
Note that when fixing this, it would be important to also fix the foreground text color to match; i.e. "dark red and black on white, light red and white on black", as this was previously a problem in version 7.5 where you'd get black-on-black text. See also bug #158032 and bug #160160 regarding the red color tones.
Comment 3 Rafael Lima 2024-03-12 12:19:38 UTC
IIRC this uses the document color, which is why it remains white, even on dark mode.

What happens if you change the "Document background" color in Tools - Options - Application colors dialog?
Comment 4 Jeff Fortin Tam 2024-03-20 15:02:32 UTC
I can confirm that this is linked to the document background color setting, in the sense that if I set it to purple then that dialog's textfield background color will be purple.

The document color is set to "Automatic" (and in the video, you can see the actual document's background color switching between white and black behind the dialog).

The dialog should either follow that color setting's auto-switch, or otherwise maybe use a separately auto-switching color specific to that dialog. If you look at the video again, you will see that it does not always remain white: the issue is that it does not update in realtime, only when re-spawning the dialog. It should change in realtime too, not "lag" behind the rest of the application.
Comment 5 Stéphane Guillou (stragu) 2024-03-27 05:49:40 UTC
With "Tools > Options > LibreOffice > Application Colours > Automatic: System Theme", it works as Jeff expects on Windows when switching between the OS' Light and Dark themes: the background colour also updates in the dialog.

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Issue reproduced as described with gtk3 VCL plugin on Ubuntu 22.04 + GNOME 42.9:

Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

(Not sure how it behaves with KDE + kf5 VCL plugin)

Caolán, you might have an idea?
Comment 6 Rafael Lima 2024-03-28 12:41:19 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> (Not sure how it behaves with KDE + kf5 VCL plugin)

Switching to "Automatic" when the system theme is "dark" works fine under kf5. So it seems to be a gtk3-only problem.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c469e786be9345fc76e5cc62fd23dd317db53c02
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 7 Commit Notification 2024-03-29 19:30:44 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26f6145b9af5738d5d3b8fe641b99b3908d81e55

Resolves: tdf#160159 update spellchecking area colors when style changes

It will be available in 24.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.
Comment 8 Caolán McNamara 2024-03-29 19:31:22 UTC
done in trunk, backport to 24-2 in gerrit
Comment 9 Commit Notification 2024-03-30 13:56:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/667e2c452998006db1ce009da9fec7f609018145

Resolves: tdf#160159 update spellchecking area colors when style changes

It will be available in 24.2.3.

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.
Comment 10 Commit Notification 2024-03-30 14:09:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/174430d7a831eede078b6718d991b506d39180f1

Related: tdf#160159 use a stock icon for the character map

It will be available in 24.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.
Comment 11 Stéphane Guillou (stragu) 2024-04-02 05:07:50 UTC
Thanks Caolán, fix verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 069bf61cea5e3aea07ffd5a1bb9f55324651cb35
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 12 Commit Notification 2024-04-23 18:20:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/18e17288781f1b974d8b08ec1253271cd42e66ef

Resolves: tdf#160159 update spellchecking area colors when style changes

It will be available in 7.6.8.

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.