Summary: | Oxygen style causes Qt program to not display png background graphic | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | philipp_muenzel |
Component: | style | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hugo.pereira.da.costa, shuizhuyuanluo |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
philipp_muenzel
2010-06-20 17:18:40 UTC
Please attach a complete test case. The code fragment above does not state where the painter paints to. As noted by Christophe, without the full chunk of code, there is nothing I can do about it. Some png are painted just fine (e.g: icons in toolbars). Now some widgets have their "paintEvent" method bypassed by oxygen, and that would likely create the issue you mention, though browsing through the code, the only case where that seems to be a problem is for QToolBars, when detached. I can confirm this problem. The background pixmap of my widget becomes dark in oxygen style, while fine in plastique style. example source run as ./myapp -style oxygen run as ./myapp -style plastique You will see the difference. =================================================== #include <QtGui/QApplication> #include <QtGui/QPalette> #include <QtGui/QPixmap> #include <QtGui/QWidget> int main( int argc, char* argv[] ) { QApplication app( argc, argv ); QWidget w; w.setAutoFillBackground( true ); QPalette p( w.palette() ); p.setBrush( QPalette::Window, QBrush( QPixmap( "example.png" ) ) ); w.setPalette( p ); w.show(); return app.exec(); } My system info Qt 4.7.2 KDE 4.6.2 Chakra Linux yes indeed the palette "brush" is ignored by oxygen when rendering widgets background (and you get the background gradient instead). I'll see to test on it and fix. Git commit 573289f1dffbceeaaf1a5e189c075cd84cae17f3 by Hugo Pereira Da Costa. Committed on 17/04/2011 at 16:15. Pushed by hpereiradacosta into branch 'master'. Do not render window background in case a custom texture is attached to a palette. CCBUG: 242271 M +8 -1 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/573289f1dffbceeaaf1a5e189c075cd84cae17f3 Git commit e7821f530cc506843523e6b846ba1095cea54513 by Hugo Pereira Da Costa. Committed on 17/04/2011 at 16:15. Pushed by hpereiradacosta into branch 'KDE/4.6'. Do not render window background in case a custom texture is attached to a palette. CCBUG: 242271 M +8 -1 kstyles/oxygen/oxygenstyle.cpp http://commits.kde.org/kde-workspace/e7821f530cc506843523e6b846ba1095cea54513 Fixed I think. So closing. |