Bug 150273 - Solid Line Style preview in Borders dialog is not seen using dark mode in Ubuntu 22.04 and OpenSuse
Summary: Solid Line Style preview in Borders dialog is not seen using dark mode in Ubu...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: All All
: low minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks: Borders-Tab Linux-Dark-Mode
  Show dependency treegraph
 
Reported: 2022-08-04 20:07 UTC by Rafael Lima
Modified: 2022-11-09 19:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the problem (50.72 KB, image/png)
2022-08-04 20:07 UTC, Rafael Lima
Details
Screenshot using light theme (60.07 KB, image/png)
2022-09-13 19:10 UTC, Rafael Lima
Details
Screenshot using dark theme in Mint with no theme or scheme, with LO Elementary icon theme (28.88 KB, image/webp)
2022-09-14 07:41 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-08-04 20:07:32 UTC
Created attachment 181617 [details]
Screenshot showing the problem

See attached image showing the "Format Cells" dialog ("Borders" tab) in LO Calc. 

Notice that in the Line Style dropdown the selected option does not match the preview just above. This happens with all available styles.

This problem only affects dark mode. It also happens in Impress.

System info

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded

Also reproducible in

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: c2e86396b741b956efc05e9dfea1e1c3286dfb9d
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Ezinne 2022-08-07 20:12:05 UTC
Reproducible in:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 36994c19fdbf425108f685de21464496bd93b651
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-NG (en_NG); UI: en-US
Calc: threaded
Comment 2 Timur 2022-09-12 15:17:12 UTC Comment hidden (me-too)
Comment 3 Timur 2022-09-12 15:21:05 UTC
I don't reproduce also with older LO, so I don't understand the bug, although report is very detailed, please clarify and compare with what you expect, maybe from non-dark mode.
Comment 4 Rafael Lima 2022-09-13 19:10:43 UTC
Created attachment 182424 [details]
Screenshot using light theme

Notice that in light theme the preview and the selected option do match (follow red arrows).

In dark mode (see attachment 181617 [details]) the preview does not match the selected option. I believe this is because the preview is being drawn using white on a white document background.
Comment 5 Timur 2022-09-14 07:41:47 UTC
Created attachment 182430 [details]
Screenshot using dark theme in Mint with no theme or scheme, with LO Elementary icon theme

Here is a screenshot using OS dark theme (not LO dark scheme) in Mint.
I chose thicker line to be seen better.
No repro kf5 and gtk3 with LO 7.5+.
Comment 6 Timur 2022-09-14 09:41:23 UTC Comment hidden (obsolete)
Comment 7 Timur 2022-09-14 10:30:37 UTC
I may have an explanation of this mystery: In Ubuntu 22.04 dark mode even with VCL: gtk3 solid line is hardly seen when selected (which is the default), so it seems missing (not so in Mint).
Any other has inverted colors so black parts are seen. 

Do you think that's the reason of this bug?

Off-topic: in Ubuntu 22.04 I can only have dark mode with gtk3, not with kf5, no idea why. I don't use full KDE, just SAL_USE_VCLPLUGIN=kf5.
Comment 8 Rafael Lima 2022-09-14 11:47:57 UTC
(In reply to Timur from comment #7)
> Do you think that's the reason of this bug?

This might be an explanation. But I do not have Ubuntu (Gnome) installed on my computer to test.

Anyways, even on a blank document, if I right-click a cell and apply solid borders to it, if I open the Borders dialog I'll still get the wrong white preview as shown in the first attachment.

It should be noted that with other line styles the preview is shown (but they seem to be missing some parts). However with the solid line, the preview is full white.
Comment 9 Timur 2022-09-14 12:53:32 UTC
I rename and confirm, until someone else comes with new info. 
Ezinee, you reproduced, but from About we don't see distro, please write.
Comment 10 Caolán McNamara 2022-11-07 17:15:30 UTC
I think the first line is getting drawn with a different color to the other lines due to an off by one error which is possibly there from some change of the "none" entry to a separate widget vs an entry in the list
Comment 11 Commit Notification 2022-11-08 08:19:01 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#150273 just take the color direct from the current entry

It will be available in 7.5.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 12 Commit Notification 2022-11-08 08:19:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#150273 maPaintCol is unused now

It will be available in 7.5.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 13 Commit Notification 2022-11-08 08:19:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#150273 use same bg as valueset

It will be available in 7.5.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 14 Caolán McNamara 2022-11-08 08:24:30 UTC
should be visible now, backport to 7-4 in gerrit
Comment 15 Commit Notification 2022-11-09 19:19:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/9447d7dd2470693c57211be9231b4792dae9fb1b

Resolves: tdf#150273 use same bg as valueset

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