diff -Naur kdebase-3.5.8.orig/kdesktop/kfileividesktop.cpp kdebase-3.5.8/kdesktop/kfileividesktop.cpp --- kdebase-3.5.8.orig/kdesktop/kfileividesktop.cpp 2007-10-08 15:58:03.000000000 +0200 +++ kdebase-3.5.8/kdesktop/kfileividesktop.cpp 2007-11-20 13:57:09.000000000 +0100 @@ -100,6 +100,13 @@ // draw the pixmap as in KIconViewItem::paintItem(...) paintPixmap(p, colors); + if ( isSelected() ) { + p->setBrush( QBrush( cg.highlight() ) ); + p->setPen( QPen( cg.highlight() ) ); + p->drawRoundRect( textRect( FALSE ), + 1000 / textRect( FALSE ).width(), + 1000 / textRect( FALSE ).height() ); + } // // Paint the text as shadowed if the shadow is available @@ -134,40 +141,10 @@ return false; } -void KFileIVIDesktop::paintFocus( QPainter *p, const QColorGroup &cg ) -{ - if ( !iconView() ) - return; - - if ( !m_shadow || !wordWrap() || - !( static_cast - ( m_shadow->shadowSettings() ) )->isEnabled() ) { - QIconViewItem::paintFocus( p, cg ); - return; - } - - int spread = shadowThickness(); - - iconView()->style().drawPrimitive( QStyle::PE_FocusRect, p, - QRect( textRect( false ).x(), textRect( false ).y(), - textRect( false ).width() - spread, - textRect( false ).height() - spread + 1 ), - cg, - isSelected() ? QStyle::Style_FocusAtBorder : QStyle::Style_Default, - QStyleOption( isSelected() ? cg.highlight() : cg.base() ) ); - - if ( this != iconView()->currentItem() ) { - iconView()->style().drawPrimitive( QStyle::PE_FocusRect, p, - QRect( pixmapRect( false ).x(), pixmapRect( false ).y(), - pixmapRect( false ).width(), pixmapRect( false ).height() ), - cg, QStyle::Style_Default, QStyleOption( cg.base() ) ); - } -} - void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg ) { - int textX = textRect( FALSE ).x() + 2; + int textX = textRect( FALSE ).x() + 4; int textY = textRect( FALSE ).y(); int align = ((KIconView *) iconView())->itemTextPos() == QIconView::Bottom ? AlignHCenter : AlignAuto; @@ -184,12 +161,15 @@ int spread = shadowThickness(); if ( isSelected() && settings->selectionType() != KShadowSettings::InverseVideoOnSelection ) { - // select using a filled rect text = cg.highlightedText(); QRect rect = textRect( false ); rect.setRight( rect.right() - spread ); rect.setBottom( rect.bottom() - spread + 1 ); - p->fillRect( rect, cg.highlight() ); + p->setBrush( QBrush( cg.highlight() ) ); + p->setPen( QPen( cg.highlight() ) ); + p->drawRoundRect( rect, + 1000 / rect.width(), + 1000 / rect.height() ); } else { // use shadow diff -Naur kdebase-3.5.8.orig/kdesktop/kfileividesktop.h kdebase-3.5.8/kdesktop/kfileividesktop.h --- kdebase-3.5.8.orig/kdesktop/kfileividesktop.h 2007-10-08 15:58:03.000000000 +0200 +++ kdebase-3.5.8/kdesktop/kfileividesktop.h 2007-11-20 13:57:09.000000000 +0100 @@ -80,12 +80,6 @@ virtual void paintItem(QPainter *p, const QColorGroup &cg); /** - * Reimplements QIconView::paintFocus() to take the shadow - * metrics into account(); - */ - virtual void paintFocus( QPainter *p, const QColorGroup &cg ); - - /** * Draws the shadow text. * @param p the painter for drawing the item * @param cg the base color group