Bug 414287

Summary: Folder widget doesn't follow Selection Text color from system color scheme
Product: [Plasma] plasmashell Reporter: Michael D <nortexoid>
Component: FolderAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs
Priority: NOR Keywords: accessibility
Version: 5.17.3   
Target Milestone: 1.0   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.17.4
Attachments: Selection issuue
Modified Norway color scheme
How it looks for me

Description Michael D 2019-11-19 09:03:35 UTC
I have a folder widget in my panel. When I expand it in list mode and select an item, the selection (background) color is correct but the selection text color is incorrect--it doesn't change.
Comment 1 Nate Graham 2019-11-19 18:47:47 UTC
This is intentional. The text color only needs to change when the color of the highlight effect is close enough to the original text color that it would make the text difficult to read. However the default highlight color is a very light blue, so there is no need to change the text color to preserve readability.
Comment 2 Michael D 2019-11-19 18:50:39 UTC
I am not using the default breeze color scheme, I'm using a modified version of Norway with a dark brown selection background and white selection text. This makes the black text color hard to read when something is selected.
Comment 3 Christoph Feck 2019-11-19 19:08:20 UTC
> there is no need to change the text color

The Breeze color scheme is free to use the same text color for selections.

Only paired combinations of QPalette and KColorScheme are supported; reopening.
Comment 4 Nate Graham 2019-11-19 19:12:05 UTC
(In reply to Michael D from comment #2)
> I am not using the default breeze color scheme, I'm using a modified version
> of Norway with a dark brown selection background and white selection text.
> This makes the black text color hard to read when something is selected.
Can you attach a screenshot?

And for the Plasma theme, are you using Breeze, Breeze Dark, Breeze Light, or a different theme?
Comment 5 Christoph Feck 2019-11-19 19:17:47 UTC
See also https://store.kde.org/p/1001640/
Comment 6 Nate Graham 2019-11-19 19:24:05 UTC
The folder view expanded representation looks fine with the CheckColorRoles color scheme (well, it looks the same as everything else in Plasma). I suspect a defective color scheme.

Michael, can you also attach the color scheme file so I can test with it?
Comment 7 Michael D 2019-11-19 20:33:00 UTC
Created attachment 124016 [details]
Selection issuue

Using default Breeze plasma theme and a slightly modified version of Norway.
Comment 8 Michael D 2019-11-19 20:33:52 UTC
Created attachment 124017 [details]
Modified Norway color scheme
Comment 9 Nate Graham 2019-11-19 21:01:49 UTC
Created attachment 124018 [details]
How it looks for me

Thanks. I stand by my earlier conclusion that the folder view widget is doing the right thing: it takes the selection color and makes it mostly transparent to turn it into a light color, which allows the use of the standard text color rather than the selected text color.

When I use your modified Norway color scheme, it looks totally fine. See attachment.

I see from your attachment that this is not the way it looks for you. It looks like for you, the opacity effect for the selection highlight is not working, and instead the selection is 100% opaque.

Do you see the same problem in other plasma highlight effects that use a mostly-transparent center? For example, in KRunner or Kickoff. If so, there may be an issue with your graphics drivers or hardware, or a compositing issue in KWin.
Comment 10 Michael D 2019-11-19 21:28:57 UTC
You're not selecting the file in your screenshot, you're only hovering over it. Mine looks the same when I only hover. In krunner, selecting an item looks like hovering over it in folder view. So I think there's still something wrong with the selection text color when selecting an item in folder view.
Comment 11 Nate Graham 2019-11-19 21:33:21 UTC
Ah, you are entirely correct! I can confirm that. Will fix.
Comment 12 Nate Graham 2019-11-19 21:52:24 UTC
I've submitted a patch that should fix it: https://phabricator.kde.org/D25418
Comment 13 Michael D 2019-11-19 22:19:30 UTC
That's great, thanks!
Comment 14 Nate Graham 2019-11-21 21:01:25 UTC
Git commit a9291006771d92345dcb6ea93c035d9896c81f1d by Nate Graham.
Committed on 21/11/2019 at 21:01.
Pushed by ngraham into branch 'Plasma/5.17'.

[Folder view] Use selected text color for selected items in full representation

Summary:
Right now, selected (not highlighted) items in the popup persist in using
the default text color , which can result in readability problems for light
themes that use a dark highlight effect.
FIXED-IN: 5.17.4

Test Plan:
Put a Folder widget in a horizontal panel, click it, hover the mouse over one
of the items in the list, and then click.

Before: {F7772272}

After: {F7772271}

No change or regressions for selected items in Folder View on the desktop.

Reviewers: #vdg, #plasma, ndavis

Reviewed By: #vdg, ndavis

Subscribers: ndavis, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25418

M  +9    -2    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://commits.kde.org/plasma-desktop/a9291006771d92345dcb6ea93c035d9896c81f1d