Summary: | Oxygen style does not draw QDockWidgets correctly if they are detached | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | Thomas Fischer <fischer> |
Component: | style | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | flying-sheep, hugo.pereira.da.costa |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Minimal example of a program with a QDockWidget and a KPart inside |
Description
Thomas Fischer
2011-05-22 14:33:58 UTC
this is due to the widget->setAttribute( Qt::WA_TranslucentBackground ); flag set on QDockWidgets by oxygen, in order to have use alpha channel to get nice rounded corners. Interestingly, the issue does not happen with oxygen-transparent. So I believe this is due to some inconsitency in widget depth, when reparenting widgets (from non argb attached dock to argb detached dock), which does not occur when both (attached and detached) are argb. Makes sense ? Now I wonder why it only happens with ktextedit and not, e.g. in dolphin. Still investigating (both Oxygen and KateView code), and so far I'm quite at a loss about what's going wrong. Any chance that you install oxygen's debug symbol (I guess they come with kde4-workspace), so that lines like: ==5843== by 0x7DD318F: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so) become more informative ? Thanks in advance, Hugo (oh well, I guess I can run Valgrind on my side too) Ok. None of the "invalid" read of your valgrind report show up in mine. I believe this is because I'm not using raster engine, and yet, I have the same bug as you. So that the valgrind report might well be unrelated :( Some additional info: at least here, setenv XLIB_SKIP_ARGB_VISUALS 1 (or set XLIB_SKIP_ARGB_VISUALS=1) fixes the issue. Can you confirm ? So definitly something ARGB related. Still: why only KateView (the embeded editor) ? Also, I really think it is an "upstream" bug, triggered by Oxygen (more precisely, by the fact that the "main" window does not have the WA_TranslucentBackground flag set, and that the "detached" Dock widget has. So, either Qt or Kate. Can you post a bug report to either (or both), passing them a link to this one and keeping me in the loop ? Maybe we could get more inputs on the issue, since so far I have been unable to fix this on my own. (And I'd really like to avoid removing the WA_TranslucentBackground flag from detached docks, cause they look quite ugly without it. And that would just be a workaround, not an actual bug fix). Thanks in advance, Hugo > setenv XLIB_SKIP_ARGB_VISUALS 1 > (or set XLIB_SKIP_ARGB_VISUALS=1) > > fixes the issue. Can you confirm ? Yes, I can confirm. > So definitly something ARGB related. > Still: why only KateView (the embeded editor) ? I had the same problem with Okular's part in KBibTeX. In the example for this bug report I used Kate's part for simplicity reasons. Try to change the example program to view a PDF file. > So, either Qt or Kate. I guess, Qt or KParts (or whatever else Okular and Kate have in common). > Can you post a bug report to either (or both), passing them a link to this one > and keeping me in the loop ? Maybe we could get more inputs on the issue, since > so far I have been unable to fix this on my own. I will test Okular in my example program before filing a bug for Kate, as it may not be Kate specific. Thanks for your help! P.S. Do you mind setting the bug status to NEEDSINFO or VERIFIED? I cannot do it and the bug exists (so it is confirmed, but not located). Well could not see "Verified" in the list, but changed the status to "Assigned" (to me :)) Thanks for the feedback on kpart. I'll investigate this code too as soon as I have time. (I was looking in kate's code before). Will keep you posted. Hugo Thomas, do you have an updated version of your test code with okular part at hand, for me to test further ? Thanks in advance, Hugo (In reply to comment #7) > Thomas, do you have an updated version of your test code with okular part at > hand, for me to test further ? I tried to expand my test program to use Okular's part, but then I cannot reproduce the error any longer. You may want to give KBibTeX a try (installing LaTeX or BibTeX is not a requirement): http://home.gna.org/kbibtex/download.html#svn Save the following BibTeX snipplet as kde.bib using a normal text editor: @article{test, url={http://www.kde.org}, pdf={http://ev.kde.org/rules/supporting_members.pdf} } After starting KBibTeX, ensure that the "Document Preview" is visible on the right side (make it visible via Settings->Show Panels). Open kde.bib and select the single entry. Either the webpage or the PDF file should be loaded in the preview. Drag the docklet to make it a window of its own. The content turns solid gray/blank. At least in my case and for the original bug report this is a reproducible way to get this error. > Save the following BibTeX snipplet as kde.bib using a normal text editor: > > @article{test, > url={http://www.kde.org}, > pdf={http://ev.kde.org/rules/supporting_members.pdf} > } Thanks ! I did try kbibtex, since I'm a regular latex/bibtex user, but so far was unable to find a dock with a pdf viewer inside. Your instructions will help. Will keep you posted ! got that too when trying to embed a katepart into an editor. just to keep you posted: I could reproduce the issue with kbibtex. Am working on it, and have a (robust) solution at hand, it is just a question of testing. It will most likely make it to kde4.7.0 Git commit 1d53154f55d9d9e97ba75a9dab92b0a9e430de0a by Hugo Pereira Da Costa. Committed on 04/07/2011 at 11:09. Pushed by hpereiradacosta into branch 'master'. do not set translucent background on dock widgets. CCBUG: 273848 M +25 -19 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/1d53154f55d9d9e97ba75a9dab92b0a9e430de0a Git commit e84a0b5f521b15f2fb4caf2b884f351b47804060 by Hugo Pereira Da Costa. Committed on 04/07/2011 at 11:23. Pushed by hpereiradacosta into branch 'master'. cleanup commented code CCBUG: 273848 M +0 -14 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/e84a0b5f521b15f2fb4caf2b884f351b47804060 Git commit 785ae16c4c5661d4ea5c2e6768fd8c0112069b4c by Hugo Pereira Da Costa. Committed on 04/07/2011 at 12:01. Pushed by hpereiradacosta into branch 'master'. fixed colors to ::roundCorner gradient. CCBUG: 273848 M +3 -3 kstyles/oxygen/oxygenstylehelper.cpp http://commits.kde.org/kde-workspace/785ae16c4c5661d4ea5c2e6768fd8c0112069b4c Git commit c7eb8290502b0f9ab998738b0d171dba8e7863dd by Hugo Pereira Da Costa. Committed on 04/07/2011 at 12:24. Pushed by hpereiradacosta into branch 'master'. store independent pixmap handles for dock widgets, to paint corners on it. CCBUG: 273848 M +39 -15 kstyles/oxygen/oxygenshadowhelper.cpp M +9 -3 kstyles/oxygen/oxygenshadowhelper.h http://commits.kde.org/kde-workspace/c7eb8290502b0f9ab998738b0d171dba8e7863dd ok. Commits shown in comments #12 to #15 should fix it. Tested on test program and kbibtex, there seem to be no issue. I'll test on it with trunk for a couple of days, and if no issues shows I'll backport to kde4.7 Feedback welcome, if you're running on trunk and have a chance to update. Cheers, Hugo Git commit fd276e27a8796f074c27381094e317a768fc4ad2 by Hugo Pereira Da Costa. Committed on 04/07/2011 at 11:23. Pushed by hpereiradacosta into branch 'KDE/4.7'. cleanup commented code CCBUG: 273848 M +0 -14 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/fd276e27a8796f074c27381094e317a768fc4ad2 Git commit 2d4a6cb1f8b5e576391837dca7b19ad0773f0562 by Hugo Pereira Da Costa. Committed on 04/07/2011 at 12:24. Pushed by hpereiradacosta into branch 'KDE/4.7'. store independent pixmap handles for dock widgets, to paint corners on it. CCBUG: 273848 M +39 -15 kstyles/oxygen/oxygenshadowhelper.cpp M +9 -3 kstyles/oxygen/oxygenshadowhelper.h http://commits.kde.org/kde-workspace/2d4a6cb1f8b5e576391837dca7b19ad0773f0562 Git commit 8d2214883b28db1d5269c78a8f9d445a6a0928ff by Hugo Pereira Da Costa. Committed on 04/07/2011 at 12:02. Pushed by hpereiradacosta into branch 'KDE/4.7'. added "roundCorner" to shadows passed to kwin. This allows to use mask for detached dockwidgets, and still have nice bevelled corners. CCBUG: 273848 M +11 -2 kstyles/oxygen/oxygenshadowhelper.cpp M +5 -2 kstyles/oxygen/oxygenshadowhelper.h http://commits.kde.org/kde-workspace/8d2214883b28db1d5269c78a8f9d445a6a0928ff Git commit 599085676d3d7bdbabe67b15e6408c84e293519b by Hugo Pereira Da Costa. Committed on 04/07/2011 at 11:09. Pushed by hpereiradacosta into branch 'KDE/4.7'. do not set translucent background on dock widgets. CCBUG: 273848 M +25 -19 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/599085676d3d7bdbabe67b15e6408c84e293519b Git commit 3f26cbc80ca8a78bdccb591e52b7c088b8529c07 by Hugo Pereira Da Costa. Committed on 04/07/2011 at 12:01. Pushed by hpereiradacosta into branch 'KDE/4.7'. fixed colors to ::roundCorner gradient. CCBUG: 273848 M +3 -3 kstyles/oxygen/oxygenstylehelper.cpp http://commits.kde.org/kde-workspace/3f26cbc80ca8a78bdccb591e52b7c088b8529c07 worked fine after a day or so of testing (no regression for other widgets), so I backported and close the bug. Feel free to re-open if anything is still not correct. |