Bug 151702 - Down arrows in Calc AutoFilter are not very visible using dark mode
Summary: Down arrows in Calc AutoFilter are not very visible using dark mode
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Rafael Lima
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: UI-Theming AutoFilter Linux-Dark-Mode Windows-Dark-Mode
  Show dependency treegraph
 
Reported: 2022-10-22 14:16 UTC by Rafael Lima
Modified: 2022-12-13 16:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the AutoFilter in dark mode (34.96 KB, image/png)
2022-10-22 14:16 UTC, Rafael Lima
Details
Screenshot of the patched button (72.74 KB, image/png)
2022-11-02 19:36 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-10-22 14:16:27 UTC
Created attachment 183202 [details]
Screenshot of the AutoFilter in dark mode

See attached screenshot for more details.

When using the Application Colors scheme "LibreOffice Dark" and the system theme is a dark variant, it's very hard to see the down-arrow button of the Autofilter.

Actually it's rendered exactly the same when the "LibreOffice" scheme is used (with white document background).

I believe this should be adaptive.

We can solve this with two approaches:

1) Using the selected color scheme: then we could use the Text color for the button background and Application Color for the down-arrow

2) Using system colors. For instance, ShadowColor for the for the background and WindowColor for the down-arrow.
Comment 1 V Stuart Foote 2022-10-23 02:14:26 UTC
1) Using the selected color scheme: then we could use the Text color for the button background and Application Color for the down-arrow

+1, I think we build these selection arrows (i.e. not from an icon theme) so maybe? If possible the Text color/Application Color from theme would be functional.
Comment 2 Roman Kuznetsov 2022-11-01 19:19:16 UTC
Agree, it should be improved
Comment 3 Rafael Lima 2022-11-02 19:36:12 UTC
Created attachment 183383 [details]
Screenshot of the patched button

In [1] we see that COL_BLACK is hardcoded as the line color regardless of anything. And for the button color the FaceColor is used (which depends on system settings).

[1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/cctrl/dpcontrol.cxx?r=ce76f924#176

So I prepared a patch that draws the button with a light gray line (COL_LIGHTGRAY) when the face color is dark. Otherwise, the current COL_BLACK is used.

See the screenshot of the patched version.

The proposed patch is here:

https://gerrit.libreoffice.org/c/core/+/142150
Comment 4 Roman Kuznetsov 2022-11-02 20:18:50 UTC
(In reply to Rafael Lima from comment #3)
> Created attachment 183383 [details]
> Screenshot of the patched button

> The proposed patch is here:
> 
> https://gerrit.libreoffice.org/c/core/+/142150

It looks much better now. I like it!
Comment 5 Commit Notification 2022-11-30 17:03:46 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/750393ef151fed5eceb9d482975f4819d449666e

tdf#151702 Improve contrast of down arrow of AutoFilter in dark mode

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 6 Stéphane Guillou (stragu) 2022-12-13 16:20:43 UTC
Fix verified with:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ad085990b8073a122ac5222e5220f8f1d6826dcf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded