Summary: | Selection text color is ignored | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | username <linx.system.adm> |
Component: | Places | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | a.samirh78, farline99, imagesfromobjects, kde, kdelibs-bugs, lopezmpau, natalie_clarius, nate, noahadvs, uhhadd |
Priority: | NOR | ||
Version: | 5.93.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Screenshot
attachment-5730-0.html attachment-16536-0.html screenshot attachment-20217-0.html |
Are you using a non-default color scheme or an edited version of one of the default color schemes? (In reply to Nate Graham from comment #1) > Are you using a non-default color scheme or an edited version of one of the > default color schemes? I am using non-default color scheme, but it makes no difference. The issue persist with default color scheme, just make sure that checkbox "Use different colors for inactive selection" NOT checked. For example how it looks with Breeze Light scheme: https://i.imgur.com/CBdHkGF.png Also I noticed if you click on empty space in Dolphin Places panel then it will use correct text color. But if you click on the files area then it will use wrong text color. After some digging I found possible source of the issue. In KIO src/filewidgets/kfileplacesview.cpp starting from line 175: const bool selectedAndActive = (opt.state & QStyle::State_Selected) && (opt.state & QStyle::State_Active); QIcon::Mode mode = selectedAndActive ? QIcon::Selected : QIcon::Normal; QIcon icon = index.model()->data(index, Qt::DecorationRole).value<QIcon>(); QPixmap pm = icon.pixmap(m_iconSize, m_iconSize, mode); QPoint point(isLTR ? opt.rect.left() + s_lateralMargin : opt.rect.right() - s_lateralMargin - m_iconSize, opt.rect.top() + (opt.rect.height() - m_iconSize) / 2); painter->drawPixmap(point, pm); if (!actionIcon.isNull()) { QPoint actionPos(isLTR ? opt.rect.right() - actionAreaWidth : opt.rect.left() + s_lateralMargin, opt.rect.top() + (opt.rect.height() - actionIconSize()) / 2); QIcon::Mode actionMode = QIcon::Normal; if (selectedAndActive) { actionMode = QIcon::Selected; } else if (m_hoveredAction == index) { actionMode = QIcon::Active; } QPixmap actionPix = actionIcon.pixmap(actionIconSize(), actionIconSize(), actionMode); painter->drawPixmap(actionPos, actionPix); } if (changePalette) { if (activePalette == QPalette()) { KIconLoader::global()->resetPalette(); } else { KIconLoader::global()->setCustomPalette(activePalette); } } if (selectedAndActive) { painter->setPen(opt.palette.highlightedText().color()); } else { painter->setPen(opt.palette.text().color()); } I'm not very good programmer, but it looks like that Places panel needs to be active to use correct color, and when it loses focus it using wrong color. Yep, I was beginning to suspect that too. Good programmer or no, you found the issue which is 90% of the battle! Please feel free to submit a merge request for it at https://invent.kde.org/frameworks/kio/-/merge_requests. (In reply to Nate Graham from comment #3) > Yep, I was beginning to suspect that too. Good programmer or no, you found > the issue which is 90% of the battle! Please feel free to submit a merge > request for it at https://invent.kde.org/frameworks/kio/-/merge_requests. I need help with this, I'm afraid my knowledge is not enough to fix bug. I tried to remove this code from line 175: && (opt.state & QStyle::State_Active) But it introduces new issue. There are 2 possible scenarios depending of "Use different colors for inactive selection" checkbox is on or off: 1) Checkbox is off. If "QStyle::State_Selected" then selection text color should be used from "opt.palette.highlightedText().color()" 2) Checkbox is on. This is how it currently works. If "(opt.state & QStyle::State_Selected) && (opt.state & QStyle::State_Active)" then selection text color should be used from "opt.palette.highlightedText().color()". Else "opt.palette.text().color()" We need to somehow check if that checkbox on or off. I'm CCing some people who might be able to help. I believe this is the same bug: https://bugs.kde.org/show_bug.cgi?id=453061 I don't quite follow. If the panel isn't focussed, it doesn't get the selection text color. Dolphin's custom view was wrong here, now it's consistent with everywhere else. (In reply to Kai Uwe Broulik from comment #7) > I don't quite follow. If the panel isn't focussed, it doesn't get the > selection text color. Dolphin's custom view was wrong here, now it's > consistent with everywhere else. https://imgur.com/a/qpmjs07 Not the panel itself, the Places item ("Desktop" in the screenshot) is selected and highlighted. The Selection text is mysteriously white. (In reply to Kai Uwe Broulik from comment #7) > Dolphin's custom view was wrong here, now it's consistent with everywhere else. No it isn't. Example screenshot: https://i.imgur.com/qVo1EK7.png Also I found a few more affected by the issue: KDE System settings > Connections and Dolphin > Configure Dolphin > Context Menu: https://i.imgur.com/V8j8v4r.png (In reply to linx.system.adm from comment #9) > (In reply to Kai Uwe Broulik from comment #7) > > Dolphin's custom view was wrong here, now it's consistent with everywhere else. > No it isn't. Example screenshot: https://i.imgur.com/qVo1EK7.png > Also I found a few more affected by the issue: KDE System settings > > Connections and Dolphin > Configure Dolphin > Context Menu: > https://i.imgur.com/V8j8v4r.png Confirming this on my end as well. Could you try with a new/fresh user account? so that it's using the default color scheme, widget style...etc. Created attachment 150489 [details] attachment-5730-0.html I can, but it doesn't affect the default color scheme. It's only if a dark selection text color is (supposed to be) used. Breeze doesn't use a dark selection text. Will report back, though. On Fri, Jul 8, 2022, 5:59 PM Ahmad Samir <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=452884 > > Ahmad Samir <a.samirh78@gmail.com> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |a.samirh78@gmail.com > > --- Comment #11 from Ahmad Samir <a.samirh78@gmail.com> --- > Could you try with a new/fresh user account? so that it's using the default > color scheme, widget style...etc. > > -- > You are receiving this mail because: > You are on the CC list for the bug. Created attachment 150491 [details] attachment-16536-0.html Tested creating a new user and modifying the default Breeze Dark theme to use a light Selection Background and a dark Selection Text, all other defaults kept. Saved as new Color Scheme. Result is the same. Selection Text color is ignored in the side panel of Dolphin, unless you click on an empty space, at which point it's correct. The behavior is the same in the other elements as described above, eg right clicking System Tray > Configure Networks pulls up the menu and Selection Text is white where it should be the dark color defined in the Color Scheme. Specs: Kubuntu 22.04 with backports-landing repo added Plasma 5.25.2 Qt 5.15,3 Kernel 5.15. 0-41 x11 Dolphin 22.04.3 Happy to do any other tests or whatever you need, this is driving me crazy. On Fri, Jul 8, 2022, 7:48 PM tim s <imagesfromobjects@gmail.com> wrote: > I can, but it doesn't affect the default color scheme. It's only if a dark > selection text color is (supposed to be) used. Breeze doesn't use a dark > selection text. Will report back, though. > > On Fri, Jul 8, 2022, 5:59 PM Ahmad Samir <bugzilla_noreply@kde.org> wrote: > >> https://bugs.kde.org/show_bug.cgi?id=452884 >> >> Ahmad Samir <a.samirh78@gmail.com> changed: >> >> What |Removed |Added >> >> ---------------------------------------------------------------------------- >> CC| |a.samirh78@gmail.com >> >> --- Comment #11 from Ahmad Samir <a.samirh78@gmail.com> --- >> Could you try with a new/fresh user account? so that it's using the >> default >> color scheme, widget style...etc. >> >> -- >> You are receiving this mail because: >> You are on the CC list for the bug. > > *** Bug 453061 has been marked as a duplicate of this bug. *** Created attachment 150604 [details]
screenshot
Also wanted to add that there's another new mystery color appearing in tabs. This is not defined anywhere in the color scheme. It's the greenish color in the attached screenshot. It would be preferable to be able to specify this color.
(In reply to tim from comment #15) > Created attachment 150604 [details] > screenshot > > Also wanted to add that there's another new mystery color appearing in tabs. > This is not defined anywhere in the color scheme. It's the greenish color in > the attached screenshot. It would be preferable to be able to specify this > color. I don't see any green in the tabs on your screenshot. It's dark background on inactive tabs, white text, purple line on the active tab and same background as in window area. The only green I see is symbol "plus" Created attachment 150663 [details] attachment-20217-0.html It's more blueish green, where the arrow is pointing. You don't see that color? It was blue like every other element until recently. The color of the tabs from the screenshot is likewise not defined anywhere in the color scheme. On Thu, Jul 14, 2022, 4:27 AM kerriganx <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=452884 > > --- Comment #16 from kerriganx <linx.system.adm@gmail.com> --- > (In reply to tim from comment #15) > > Created attachment 150604 [details] > > screenshot > > > > Also wanted to add that there's another new mystery color appearing in > tabs. > > This is not defined anywhere in the color scheme. It's the greenish > color in > > the attached screenshot. It would be preferable to be able to specify > this > > color. > I don't see any green in the tabs on your screenshot. It's dark background > on > inactive tabs, white text, purple line on the active tab and same > background as > in window area. The only green I see is symbol "plus" > > -- > You are receiving this mail because: > You are on the CC list for the bug. Hello, just wondering if there's been any news with this? It is still very much an issue. Thanks for your time! Still an issue. Wayland, KDE Plasma 5.27.3, Dolphin 22.12.3. Graphite nord theme |
Created attachment 148312 [details] Screenshot SUMMARY Selection text color in places panel in Dolphin and open/save dialogs is ignored The bug appeared after updating Dolphin from 21.12.3 to 22.04.0 However in open/save dialog the bug also was present before STEPS TO REPRODUCE 1. In KDE System Settings > Appearance > Colors make sure that checkbox "Use different colors for inactive selection" NOT checked 2. Look at the places panel in Dolphin or open/save dialog OBSERVED RESULT Selected text color is the same as not selected (in screenshot on the left) EXPECTED RESULT Selected text color should be used from color scheme (in screenshot on the right) SOFTWARE/OS VERSIONS KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.93.0 KDE Gear Version: 22.04.0 Qt Version: 5.15.3