[Webkit-unassigned] [Bug 31742] New: QWebView ignores a palette set with QWebView::setPalette()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 20 13:29:53 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31742

           Summary: QWebView ignores a palette set with
                    QWebView::setPalette()
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: strahinja.markovic at gmail.com


In Qt, the QWebView widget ignores a custom palette set with
QWebView::setPalette(), but does use a custom palette set with
QApplication::setPalette(). QWebView should use the palette set specifically
for it. There is no reason it can't.

For instance (code written from memory, may not compile):

QPalette palette;
QBrush brush( QColor( 170, 3, 148, 255 ) ); // deep purple
brush.setStyle( Qt::SolidPattern );
palette.setBrush( QPalette::Active, QPalette::Highlight );

webview->setPalette( palette );

This should cause QWebView to use a deep shade of purple for highlighted text.
It doesn't.

This on the other hand, does work:

QPalette palette;
QBrush brush( QColor( 170, 3, 148, 255 ) ); // deep purple
brush.setStyle( Qt::SolidPattern );
palette.setBrush( QPalette::Active, QPalette::Highlight );

qApp->setPalette( palette );

Which means that the current style is not overriding anything. Analyzing the
RenderThemeQt.cpp file in webkit sources clearly shows that the custom widget
palette is being ignored. The color is read directly from the application
palette.

This is all on Win7 x64, Qt 4.5.2. I don't know which version of webkit that is
so I just left the default.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list