Version: (using 4.1.60 (KDE 4.1.60 (KDE 4.2 >= 20080709)), compiled sources) Compiler: gcc OS: Linux (x86_64) release 2.6.24-20-generic In recent times there was a feature introduced where an icon would be shown when hovering over a link that would open in a new window. From recent builds from SVN this icon only shows as a black area of the shape of the icon. This is the case even with mailto:links
Created attachment 26427 [details] shows a back shape when there should have been an icon
Confirmed (rev. 838173)
It seems like Qt no longer handles the background texture brush. If I just use QLabel instead, if fixes the blackness, but the mask is messed up!
Well, this gets it to work: +++ khtmlview.cpp (working copy) @@ -410,7 +410,7 @@ bool accessKeysPreActivate; CompletedState emitCompletedAfterRepaint; - QWidget* cursor_icon_widget; + QLabel* cursor_icon_widget; // scrolling activated by MMB short m_mouseScroll_byX; @@ -1459,22 +1459,20 @@ if( !d->cursor_icon_widget ) { #ifdef Q_WS_X11 - d->cursor_icon_widget = new QWidget( 0, Qt::X11BypassWindowManagerHint ); + d->cursor_icon_widget = new QLabel( 0, Qt::X11BypassWindowManagerHint ); XSetWindowAttributes attr; attr.save_under = True; XChangeWindowAttributes( QX11Info::display(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr ); #else - d->cursor_icon_widget = new QWidget( NULL, NULL ); + d->cursor_icon_widget = new QLabel( NULL, NULL ); //TODO #endif d->cursor_icon_widget->resize( icon_pixmap.width(), icon_pixmap.height()); if( !icon_pixmap.mask().isNull() ) - d->cursor_icon_widget->setMask( icon_pixmap.mask()); + d->cursor_icon_widget->setMask( icon_pixmap.createMaskFromColor(Qt::transparent)); else d->cursor_icon_widget->clearMask(); - QPalette palette; - palette.setBrush( d->cursor_icon_widget->backgroundRole(), QBrush( icon_pixmap ) ); - d->cursor_icon_widget->setPalette( palette ); + d->cursor_icon_widget->setPixmap( icon_pixmap); d->cursor_icon_widget->update(); } QPoint c_pos = QCursor::pos(); ... But it's inefficient. The reason ::mask doesn't work is that the boundary buffers are semi-transparent, so they get clipped away.. Will improve performance and commit..
SVN commit 838505 by orlovich: Fix a bunch of issues with sub-cursor link type indicator: 1) Don't make it all black --- seems like Qt doesn't like texture brushes anymore. 2) Fix mask setting --- default mask constructions cuts away all pixels with non-0xff alpha. And no, this isn't less efficient --- ::mask recomputes all the time anyway. 3) Actually change the icon when needed. As a bonus, we don't bug kiconloader all the time while the cursor is wiggling over a link Also, be evil, and sanify the variable name. BUG: 167512 M +41 -48 khtmlview.cpp M +1 -1 khtmlview.h WebSVN link: http://websvn.kde.org/?view=rev&revision=838505
Wonderful. Looks fine now. Thanks!