Bug 127861 - gtk/gtk2 menubar selection color problem
Summary: gtk/gtk2 menubar selection color problem
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-23 01:52 UTC by Erin Clark
Modified: 2014-09-15 09:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.13
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erin Clark 2006-05-23 01:52:34 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Slackware Packages
OS:                Linux

With GTK/GTK2 apps, the highlighted text on the menubar does not change from the original font color when it is selected.  On dark themes this can make reading the text hard if not impossible.  Is there anyway to fix this?
Comment 1 Thiago Macieira 2006-05-27 20:15:36 UTC
How is this a KDE problem?
Comment 2 Erin Clark 2006-05-27 21:51:30 UTC
sorry i should have specified, but I was referring to KDE's coloring of non-KDE apps
Comment 3 bmarsh 2006-06-15 00:23:29 UTC
I would like to add that the GTK file navigation has become unusable (under KDE)  I realize this is NOT a KDE problem but since KDE uses GTK extensively for its apps, someone with a large club should attack the GTK way of doing things.  Currently, running KDE 3.5.3 on SuSE 10.1, the file navigation windows appear to have 'shading' applied in this latest release.  In my case, that 'shading' is total black such that I can only read every other line.  Not Usable!!

</rant on>
Add to the above that I think the design of the GTK file navigation system is abominable and far from intuitive for normal users and I wish the whole thing would be chucked in the trash.  <\rant off>
Comment 4 Thiago Macieira 2006-06-25 11:58:11 UTC
KDE does not use GTK extensively for its apps. The only applications that use GTK are GTK applications, not KDE applications.
Comment 5 Travis Evans 2006-12-19 05:19:20 UTC
I've had the same problem here for a long time, with the last several versions of KDE (currently SUSE 10.1, KDE 3.5.5).  The KDE color settings are applied to GTK2 apps except that the menu foreground color does not change when highlighted like it should, making dark selection colors unusable.  This doesn't happen when running GTK apps under GNOME or certain other window managers (although in that case a different, GNOME, theme is applied), so it does seem to have something to do with the way KDE applies colors to GTK2 applications.
Comment 6 Jonathan Thomas 2008-12-28 15:08:19 UTC
This would be a problem with the gtk-qt-engine software, not KDE. 
http://gtk-qt.ecs.soton.ac.uk/
Comment 7 Travis Evans 2014-07-03 01:09:06 UTC
Are you sure? I don't even have gtk-qt-engine installed. I'm talking specifically about the “apply colors to non-KDE apps” checkbox in System Settings > Colors. I've looked at the resulting generated gtkrc, and it simply misses the menu foreground color item. Having it include this item would fix this issue, which still exists to this day (I'm quite frankly surprised more people don't report it. It makes dark KDE themes totally unusable with GTK apps).
Comment 8 Christoph Feck 2014-07-21 15:57:40 UTC
Travis, could you be more specific which items are generated (so that I can find the code responsible), and which items are missing? Maybe I can add them.
Comment 9 Travis Evans 2014-07-21 19:28:43 UTC
Thanks--I'm admittedly not too familiar with the gtkrc-2.0 file format, so it's possible I'm wrong about this.  I seem to remember being able to manually edit the file to make the menu selected foreground correct to temporarily fix the issue, though more recently my attempt to do this failed because I don't really understand the format of the items or which one corresponds to the menu color foreground.  I could attach a generated gtkrc-2.0 for a color scheme that fails to work properly; perhaps this would help pinpoint it.
Comment 10 Travis Evans 2014-09-09 22:37:48 UTC
Okay, I think I finally found it. In ~/.kde4/share/config/gtkrc-2.0, I have a set of lines near the bottom of the file that look like:

style "MenuItem"
{
  bg[PRELIGHT] = { 0.490, 0.039, 0.039 }
}

There is no entry for fg[PRELIGHT], so all highlighted menu items in a menu always show in black regardless of background, rather than using the entry from KDE's color settings (though highlighted items on the menu bar itself are okay). If I manually add the proper entry, it fixes colors in Firefox/Thunderbird, for instance.
Comment 11 Christoph Feck 2014-09-14 09:09:38 UTC
Git commit 32d7d19aee2aa9ea910903217712325d33f733ea by Christoph Feck.
Committed on 14/09/2014 at 09:07.
Pushed by cfeck into branch 'KDE/4.11'.

Set foreground color for GTK2 menus
FIXED-IN: 4.11.13

M  +1    -0    kcontrol/krdb/krdb.cpp

http://commits.kde.org/kde-workspace/32d7d19aee2aa9ea910903217712325d33f733ea
Comment 12 Christoph Feck 2014-09-14 13:27:58 UTC
Thanks Travis, I just committed a fix for the October release.
Comment 13 Christoph Feck 2014-09-15 09:51:27 UTC
Git commit f658141e2d4704129b843cfad566029e380a47b0 by Christoph Feck.
Committed on 14/09/2014 at 18:50.
Pushed by cfeck into branch 'master'.

Forward-port krdb fixes from 4.11 branch

- Set correct Text foreground color on Base background
- Set foreground color for GTK2 menus

M  +2    -1    kcms/krdb/krdb.cpp

http://commits.kde.org/plasma-desktop/f658141e2d4704129b843cfad566029e380a47b0