Bug 345521 - Dark theme and rename on panel folders
Summary: Dark theme and rename on panel folders
Status: RESOLVED WORKSFORME
Alias: None
Product: dolphin
Classification: Applications
Component: panels: folders (other bugs)
Version First Reported In: 16.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 17:55 UTC by andre.cbarros
Modified: 2020-04-26 12:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
dolphin with dark theme - trying to rename (44.04 KB, image/jpeg)
2015-03-25 17:55 UTC, andre.cbarros
Details
dolphin with dark theme - rename (fixed) (42.62 KB, image/jpeg)
2015-03-25 17:56 UTC, andre.cbarros
Details
Dark theme (144.66 KB, image/jpeg)
2015-03-25 17:58 UTC, andre.cbarros
Details
Patch for Dolphin folders panel embedded rename and unreadable text with dark themes glitch (1.31 KB, patch)
2015-03-27 01:15 UTC, andre.cbarros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andre.cbarros 2015-03-25 17:55:38 UTC
Created attachment 91737 [details]
dolphin with dark theme - trying to rename

It is a glitch that affects many KDE applications for what I have seen.

The problem is associated to the default color used on active widgets when the widgets are embedded on something with window colors. When editing, the background is set to "View Background" (same as QPalette:Base) but the foreground is mistakenly set to "Window Text" (QPalette:WindowText) when it should be "View Text" (QPalette:Text).

On dophin case, the patch below fix the problem:

--- dolphin/src/kitemviews/kitemlistcontainer.cpp.orig 2015-02-26 11:44:34.000000000 -0300
+++ dolphin/src/kitemviews/kitemlistcontainer.cpp      2015-03-25 13:47:08.567327972 -0300
@@ -121,7 +121,7 @@
         // to the text color, so that enough contrast is given for all color
         // schemes
         QPalette p = graphicsView->palette();
-        p.setColor(QPalette::Active,   QPalette::Text, p.color(QPalette::Active,   QPalette::WindowText));
+        p.setColor(QPalette::Active,   QPalette::Text, p.color(QPalette::Active,   QPalette::Text));
         p.setColor(QPalette::Inactive, QPalette::Text, p.color(QPalette::Inactive, QPalette::WindowText));
         p.setColor(QPalette::Disabled, QPalette::Text, p.color(QPalette::Disabled, QPalette::WindowText));
         graphicsView->setPalette(p);

-----------------------------------------------------

As I said, dark themes are affected by this glitch. I am looking on oxygen-gtk to see if it does something similar (I believe it does).
Comment 1 andre.cbarros 2015-03-25 17:56:52 UTC
Created attachment 91738 [details]
dolphin with dark theme - rename (fixed)
Comment 2 andre.cbarros 2015-03-25 17:58:34 UTC
Created attachment 91739 [details]
Dark theme
Comment 3 Emmanuel Pescosta 2015-03-26 19:05:44 UTC
Thanks for the bug report and for the patch! :)

Can you please upload your patch to git.reviewboard.kde.org?
Comment 4 andre.cbarros 2015-03-27 01:12:19 UTC
As I said, I am investigating what other KDE applications may display this glitch.

May be, this kind of information (QPalette selection) should be addressed on KDE interface guidelines (if not already).

Regards,
André
Comment 5 andre.cbarros 2015-03-27 01:15:48 UTC
Created attachment 91762 [details]
Patch for Dolphin folders panel embedded rename and unreadable text with dark themes glitch
Comment 6 Christoph Feck 2015-03-30 20:36:40 UTC
The patch is not correct. Dolphin does use the Window color on the background, not the View background color. Otherwise it would appear white with standard Oxygen colors.

The actual line-edit, however, has its own background, so the fix would be to make sure the line-edit also has the correct foreground.

To better test this, use CheckColorRoles from kde-look.org.
Comment 7 andre.cbarros 2015-04-01 12:48:43 UTC
Read the comments again. I am talking about the embedding rename, not the background of the panel which is correct. When you right click on a folder in the panel and select "Rename" an edit text box is created and it does use the background color of edit boxes but the text color is kept as the color of text on windows, which is not correct.
Comment 8 Kai Uwe Broulik 2017-08-23 16:00:45 UTC
Is this still an issue? I cannot reproduce this anymore (neither with Breeze, nor Oxygen, nor dark or white colors)
Comment 9 Méven Car 2020-04-26 12:17:13 UTC
I can confirm this does not reproduce on recent dolphin (20.08 in my case).