Bug 301034 - Rename input field doesn't respect text[NORMAL] when GTK theme is used
Summary: Rename input field doesn't respect text[NORMAL] when GTK theme is used
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.7.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Davide Gianforte
URL:
Keywords:
: 420461 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-02 07:42 UTC by Dmytro Kostiuchenko
Modified: 2020-06-03 06:13 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Renaming bug in Kvantum on Plasma (236.24 KB, image/jpeg)
2018-11-17 09:29 UTC, Michał Dybczak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmytro Kostiuchenko 2012-06-02 07:42:58 UTC
Custom colors in Krusader may override essential styling information from GTK theme.
Particularly, when renaming file, kind of inline input field is created in place of filename. That field respects all GTK theme styles except for text[NORMAL] (even text[SELECTED] is respected). On the followint screenshot text in rename field is of the Foreground color chosen in Krusader color settings, but rather should be of color text[NORMAL] provided by GTK theme.
http://imageshack.us/photo/my-images/803/201206021026251920x1080.png/

Reproducible: Always

Steps to Reproduce:
1. Make Qt applications to use GTK theme with base[NORMAL] color set to some value X
2. Set krusader to not use default KDE colors and choose the color X as the foreground color
3. Try renaming some file
Actual Results:  
Text is not visible in rename input field as its color is X which is the same as GTK theme background color for input field.

Expected Results:  
Text is colored as GTK text[NORMAL] and is visible

Found on theme Equinox Evolution
Comment 1 yaron160 2018-06-20 08:50:23 UTC
The problem still persists in Krusader version 2.8.0-dev.
This is an issue that bugs me for a while, as I'm not using the gtk theme.
It is still reproducible in the same way Dmytro mentioned.
Comment 2 Nikita Melnichenko 2018-07-08 06:52:59 UTC
Please clarify steps to repro. You say you don't use gtk theme but step 1 says to use it. Can you repro with some standard theme like Oxygen, Breeze? How do I figure base[NORMAL] of a theme?
Comment 3 yaron160 2018-07-08 10:08:52 UTC
Sorry, in my previous comment I meant to say that I'm not using the GTK theme colors in Krusader! I was using the GTK theme in QT applications. 

Indeed, when you set the QT style to "GTK+" the problem still persists, but it turns out that with a different style (such as "Fusion") te problem is solved: in rename mode all colors are taken from Krusader's configurations.

To reproduce the problem (based on Dmytro's post):
1) Make QT applications use the style "GTK+", and a custom palette with the normal background set to some color X (by default this would be white).
2) In krusader's colors configuration, uncheck the "use default KDE colors" option, and set all active foreground colors to the same color X (white, if using default kde values).
3) try renaming a file.

Actual Results:  
Text is not visible in rename input field as its color is X (taken from Krusader's configurations) which is the same as GTK theme background color for input field.

Expected Results:  
Text is colored as GTK text[NORMAL] and is visible (by default this would be black on white)
Comment 4 Nikita Melnichenko 2018-07-11 06:04:22 UTC
(In reply to yaron160 from comment #3)
> 1) Make QT applications use the style "GTK+", and a custom palette with the
> normal background set to some color X (by default this would be white).
Sorry, I'm not into styles. How do you do this? Any extra packages I need to install?
Comment 5 yaron160 2018-07-11 14:35:15 UTC
I've used the "qt5ct" package to set all the configurations I mentioned earlier. Installed it from ppa, but you can also download a deb file. See here: 
http://www.webupd8.org/2015/11/configure-qt5-application-style-icons.html

If I understand correctly it's not really necessary, but it gives some GUI which makes things easier!
Comment 6 Nikita Melnichenko 2018-07-13 05:28:41 UTC
Thanks for the reference. I'll try to check it when I have time.
Comment 7 Nikita Melnichenko 2018-08-24 04:46:23 UTC
I installed qt5ct. It broke all the KDE styling even before the first run. Uninstalled it instantly. Will only try on VM when I have a chance.

I wonder if there is an easier way to repro it.
Comment 8 Michał Dybczak 2018-11-17 09:28:10 UTC
I have the same problem on.. Plasma. It's not just Gtk themes that causes the problem, it's also Kvantum that causes that effect. Since the issue happens on various themes, I believe it should be fixed in Krusader.

I'm sending a screenshot from Plasma on Kvantum with that issue. Here are threads about this bug on various theme project sites:

https://github.com/horst3180/Vertex-theme/issues/115

https://github.com/linuxmint/mint-y-theme/issues/90

Since renaming action is a very common one, I wouldn't name the bug minor. Because of that, I'm forced to use Dolphin for renaming files.

Since we like certain styles, this bug is following us on various computers. It's better to avoid Krusader for renaming actions instead of forcing the whole desktop style I don't like.
Comment 9 Michał Dybczak 2018-11-17 09:29:01 UTC
Created attachment 116367 [details]
Renaming bug in Kvantum on Plasma
Comment 10 Davide Gianforte 2020-05-17 13:48:32 UTC
*** Bug 420461 has been marked as a duplicate of this bug. ***
Comment 11 Davide Gianforte 2020-06-03 06:13:08 UTC
Git commit 1afe484b6931ce8239a0031e3fbaa4dfd05ca8a6 by Davide Gianforte.
Committed on 03/06/2020 at 06:13.
Pushed by gengisdave into branch 'master'.

Configurable colors to rename line

Add to Konfigurator two options to set foreground and background colors to be
applied to the rename field.
Related: bug 414968
FIXED: [ 301034 ] Rename input field doesn't respect text[NORMAL] when GTK theme is used
FIXED: [ 414968 ] Using provided custom colour package Midnight Commander, renaming files is difficult, as line colours are very pale.
ADDED: In Konfigurator, two options are added to set foreground and background colors to the rename field.
GUI: Two new options ("Rename background" and "Rename foreground") are seen by users.

M  +2    -0    krusader/Konfigurator/kgcolors.cpp
M  +15   -0    krusader/Panel/PanelView/krviewitemdelegate.cpp
M  +2    -0    krusader/Panel/krcolorcache.cpp

https://invent.kde.org/utilities/krusader/commit/1afe484b6931ce8239a0031e3fbaa4dfd05ca8a6