Summary: | Incorrect color scheme in Qt4 applications, running in KDE4 environment | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Dmitry Nezhevenko <dion> |
Component: | qt | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | andresbajotierra, armin, bugzilla, echidnaman, federico.lox, g4mba5, gio.grifis, godutchnow, igor.poboiko, kde, kojot350, mail, ogoffart, olivier.roncali, piemonkey, pierre, rdieter, spatz |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
screenshot
screenshot showing systemsettings, qtconfig, assistant and designer together qt4 vs kde4 gui elements colorbug.png diff against Qt 4.4.3 |
Description
Dmitry Nezhevenko
2008-08-03 13:08:02 UTC
Created attachment 26597 [details]
screenshot
Confirm that, for example kopete and qstardict settings
I can confirm that too. It is simple to reproduce. Set the color scheme to "wonton soup" and open qtconfig, qt assistant and qt designer. You will notice that designer gets the correct colors but qtconfig and assistant get the wrong colors. Some colors are changed in assistant and qtconfig, but not all of them! Created attachment 26599 [details]
screenshot showing systemsettings, qtconfig, assistant and designer together
Notice that qtconfig and assistant have the wrong colors.
I can confirm color issues on kde4 vs qt4-only. Most color seem to be transformed right (application window, buttons ...), but certain colors are not ("selection", tooltips, progressbars). I am using kde4.1.0 on FreeBSD. A ML-Thread discussing detail is available here: http://mail.kde.org/pipermail/kde-freebsd/2008-August/003610.html A Screenshot demonstrating my issues is also available in the archive: http://mail.kde.org/pipermail/kde-freebsd/attachments/20080822/746d8762/attachment-0001.jpeg (note that the window being darker is Kwin-effect, not a color problem) Thanks for your help! Created attachment 27629 [details]
qt4 vs kde4 gui elements
Confirmed - not only colors are not set properly but looks like all QT4 GUI elements are actually larger that KDE4 ones.
Screenshot attached.
Created attachment 27726 [details]
colorbug.png
Took me a while to find this bug, but I'm glad it's an issue that has been reported by others. Throwing my screenshot onto the pile.
Is Qt4 reading the ~/.config/Trolltech.conf file? I see Palette\active, Palette\disabled, and Palette\inactive in there. Each contains a long list of hex colors. Are all of those being set properly by KDE System Settings applet? Is Qt4 respecting those palettes? Is this a KDE4 bug (not configuring Qt4's palette appropriately) or a Qt4 bug (not respecting configured palette)?
I've found a little hack to fix this problem, this is an excerpt from the bug report I've opened on Launchpad: "After doing some research through strace logs I've found that all Qt4 related apps read ~/.conf/Trolltech.conf a few times during startup and by deleting all the colour-related lines in the [qt] section of this file the problem seems to be solved (of course this 'hack' should be repeated each time modified settings in SystemSettings' colour and style panels are applied or qtconf-qt4 is used). It's a weird, weird bug IMHO" Look here (https://bugs.launchpad.net/opensuse/+bug/289540) for more info/attachments. I've encountered this same bug on all the distros shipping KDE 4.1.2 (Kubuntu 8.10, Mandriva 2009.0 and openSUSE 11.1). I can confirm, the hack fixes the problems. You need to remove all of the *palette*-lines. I suppose this KDE writing the wrong lines to the file, or not? *** This bug has been confirmed by popular vote. *** The small hack I found seems to work in a stable manner, so I'm posting a small tip to automate it since the "Palette" lines keep on coming back at every session login. Just create a shell script wherever you want (mine is ~/fix_qt4_colors) and paste the following 2 lines into it: #!/bin/sh cat ~/.config/Trolltech.conf | grep -v ^Palette > ~/.config/Trolltech.conf That will filter out the lines charged with messing colors for qt4-only apps and save the result back to Trollech.conf. Now all you need to do is make the script executable and add it to your session startup through Systemsettings' Autostart module. P.s.: I know this is a basic procedure but many linux beginners follow the instructions found in bug reports to solve problems. P.p.s: I'm posting this on Launchpad too. Yeah, that works. I just hacked around the problem, by removing the lines manually and chmod -w ~/.config/Trolltech.conf I really think this is a KDE-Issue though, so someone should just remove the code that writes KDE's palette to ~/.config/Trolltech.conf . Apperently it isnt necessary anyway. I can confirm this bug still exists in 4.2 Beta 1. Especially when not using the Oxygen theme this is noticable. I have this same problem, however the 'hack' listed above causes as many problems as it fixes for me. I use a mix of pure qt4, kde4, and gtk apps. I use a dark self-made blue/black color scheme, QTCurve-kde4, and QTCurve-gtk. I use lxappearance to have gtk apps show up with qtcurve-gtk identically to normal kde4 including fonts and oxygen icons, and kde4 handles the colors. Kde4-gtk or whatnot nor gtk-qt-engine work correctly for me, primarily color and font problems. The naked qtcurve-kde4 + lxappearance works perfectly except.. I can have EITHER the pure qt4 app colors show up slightly wrong (some bits of white atop tabs, and white selected items) or the gtk app colors -completely- wrong (-everything- is white-ish) if I use the hack or either of the aformentioned programs. One gets fixed, the other gets messed up. The aforementioned hack does indeed fix pure qt4 apps, but does screw up gtk ones. Unless I've messed something up somewhere, those added lines don't seem to be as unnecessary as suggested above -- they make gtk apps look right. Since I have less pure qt4 programs that I frequently use and their color problem is minor instead of major, that is the lesser of two evils I deal with. If anyone has any other ideas or could point me to how I screwed the above up and -can- have both qtcurved gtk and qtcurved pureQT4 fixed simultaneously, I would be most grateful. The problem -appears- to be fixed (yay! pure qt, kde, and gtk apps all working together!) in markc's kde4-svn nightly binary build for Arch Linux on Dec. 12, 2008, using the qt package from the same repository titled "qt-snapshot-4.5.0-2008121101". Thank goodness. That was annoying me more than anything else on kde4! I found it! It's not a KDE bug at all! Look at <http://websvn.kde.org/trunk/qt-copy/src/gui/kernel/qapplication_x11.cpp?view=markup> -- the function "kdeColor" (used for a few select color roles, including selectBackground) tries to read "~/.kde/share/config/kdeglobals" for a few select color roles. On most systems, that's the KDE3 version of the file. I just downloaded the latest Qt 4.5 snapshot, and it has the problem solved. I'm working on a patch to backport their fix. I'll post it here once I've tested it. (In the meantime, the workaround that doesn't involve constantly re-editing Trolltech.conf is to put the right colors in your KDE kdeglobals file. Note that you can't just copy the KDE4 version, because the names of the color roles have changed.) Created attachment 29627 [details] diff against Qt 4.4.3 Ok, so far so good with this patch. Feel free to point your distro maintainers this way. For openSUSE users, I have packages building in my OBS repository at <http://download.opensuse.org/repositories/home:/pantsgolem/>, but the Build Service server is being difficult, so it may be a while before it's available for all versions/arches. IMO you should try to get this into Qt copy. This is the fastest way to get this reviewed and into the distributions. I'd mail kde-core-devel@kde.org if I'd be you... Thanks for the patch btw :-) Shouldn't this be marked as UPSTREAM as it's a QT bug ? I can confirm this bug, KDE 4.1.4, Qt 4.4.3 When i move ~/.kde4/share/config/kdeglobal to ~/.kde/share/config/kdeglobal, system theme applyes to my qt4-apps PS sorry for my bad english i think this patch should go on qt-copy before closing the bugreport The patch only seems to fix fonts, not the colour scheme confirm...colour scheme is still wrong for me... I confirm. openSUSE 11.1 x86_64 Qt: 4.4.3 KDE: 4.2.00 (KDE 4.2.0) "release 83.1" Plasma Workspace: 0.3 x11-video-nvidiaG02, Version: 180.22-4.1 Is this bug reported to Qt software? Is there a patch in qt-copy? Is anybody working on it? (In reply to comment #24) > Is this bug reported to Qt software? Is there a patch in qt-copy? Is anybody > working on it? Please read the comments before you ask a question. Comment #15 says this bug has already been fixed in Qt 4.5. *** Bug 183787 has been marked as a duplicate of this bug. *** (In reply to comment #25) > (In reply to comment #24) > > Is this bug reported to Qt software? Is there a patch in qt-copy? Is anybody > > working on it? > > Please read the comments before you ask a question. Comment #15 says this bug > has already been fixed in Qt 4.5. > I upgraded to qt4.5 and the colour scheme is still incorrect oops sorry disregard that last message I was running qt3config to check; The colour scheme actually is correct in qt4 apps *** Bug 184487 has been marked as a duplicate of this bug. *** Qt-copy is now Qt 4.5, so it wouldn't be necessary to add the patch any more. |