Bug 154774 - Preview in Spacing dialog does not respect dark mode
Summary: Preview in Spacing dialog does not respect dark mode
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Rizal Muttaqin
URL:
Whiteboard: target:7.6.0 target:7.5.4
Keywords: accessibility
Depends on:
Blocks: Icon-Themes Icon-Theme-Breeze Icon-Theme-Sifr Icon-Theme-Sukapura Dark-Mode
  Show dependency treegraph
 
Reported: 2023-04-12 14:21 UTC by Rafael Lima
Modified: 2024-02-05 11:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the problem (28.96 KB, image/png)
2023-04-12 14:21 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-04-12 14:21:25 UTC
Created attachment 186618 [details]
Screenshot showing the problem

In Math, the preview in the Spacing dialog does not respect dark mode.

Steps to reproduce:
1) Open Math (make sure you're using dark mode)
2) Go to Format - Spacing
3) Notice that the preview in the right uses dark color over dark background

System info

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:7.5.2~rc2-0ubuntu0.22.10.1~lo1
Calc: threaded
Comment 1 Rafael Lima 2023-04-12 14:53:45 UTC
The problem here is related to the available images in each icon theme. Each "preview" is actually a hardcoded image that depends on the current icon theme.

For instance, the image in the screenshot is "dist11.png", which is not defined for Breeze dark (which is the theme I'm using). It's only defined for Colibre, Colibre dark and Karasa jaga.

Since we already have light and dark variants for these images, We could simply copy them into the other icon themes.

@Rizal, what's your opinion about this?
Comment 2 Stéphane Guillou (stragu) 2023-04-12 15:09:22 UTC
Reproduced on Ubuntu 20.04 with GNOME 3.36.8 using gtk3, kf5 and qt5 VCLs.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b06f35de68a555b85bceb5fc29d1a5f426f4bb7
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Same on macOS.
Comment 3 Rizal Muttaqin 2023-04-12 15:28:26 UTC
Ah big thanks for this bug report. I am about to create the same report but always forgotten. Actually this is on my to do list.
Comment 4 Commit Notification 2023-04-24 09:15:16 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8505d29d61a76ffa506be0dc86fe2ec7ed647483

tdf#154774 Breeze: Add images for spacing preview in Math

It will be available in 7.6.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 5 Commit Notification 2023-04-24 13:22:48 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6e0d4020836004d754950b34ac170ed7d24e6542

tdf#154774 Breeze: Add images for spacing preview in Math

It will be available in 7.5.4.

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 6 Commit Notification 2023-04-24 13:56:54 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/33a4a934a230c551d053c30938ec802b2924182b

tdf#154774 Breeze & Sifr: Add image for spacing preview in Math

It will be available in 7.6.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 7 Commit Notification 2023-04-24 23:44:59 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/1e860ee6fe1a7b8cc141bda1106364d8ebb3f9b3

tdf#154774 Breeze & Sifr: Add image for spacing preview in Math

It will be available in 7.5.4.

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 Commit Notification 2023-04-25 02:13:15 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/398d64e32c60871315ca31524d7a204fb0576ebe

tdf#154774 KJ & Sukapura: +/^ images for spacing preview in Math

It will be available in 7.6.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 9 Commit Notification 2023-04-25 04:12:25 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/98c95b65480c71d1fa0d3da1cdf68e13b73b6306

tdf#154774 KJ & Sukapura: +/^ images for spacing preview in Math

It will be available in 7.5.4.

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 Stéphane Guillou (stragu) 2024-02-05 11:48:49 UTC
Rizal, was there more to do here?

Testing with a recent trunk build:

- Breeze (dark): OK
- Colibre (dark): OK
- Sifr (dark): text is light grey on dark grey background. Better than in 7.4, but still not enough contrast for the high contrast icon theme.
- Sukapura (dark): OK

So there is only Sifr left to fix?