summaryrefslogtreecommitdiffstats
path: root/kdesktop/kfileividesktop.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kdesktop/kfileividesktop.cpp
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
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
Diffstat (limited to 'kdesktop/kfileividesktop.cpp')
-rw-r--r--kdesktop/kfileividesktop.cpp38
1 files changed, 6 insertions, 32 deletions
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<KDesktopShadowSettings *>
- ( 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