From 10e41144596fc9ced40fc349d9ecd099b1c2ea19 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 20:21:27 +0000 Subject: Initial import of Trinity 3.5.11 to kdebase Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/kfileividesktop.cpp | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'kdesktop/kfileividesktop.cpp') diff --git a/kdesktop/kfileividesktop.cpp b/kdesktop/kfileividesktop.cpp index 28bf51105..f9ea12a51 100644 --- a/kdesktop/kfileividesktop.cpp +++ b/kdesktop/kfileividesktop.cpp @@ -134,40 +134,11 @@ bool KFileIVIDesktop::shouldUpdateShadow(bool selected) 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 +155,15 @@ void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg ) 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 -- cgit v1.2.1