summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-20 17:18:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-20 17:18:56 +0000
commit83e845857283fe358635b48709c649f90665edc6 (patch)
treecdcda83cac37ea675e42c34a9f6c5a0a97c2edcc /kdesktop
parent5116f6efd12d4bda005d5ec50181bc21ed36659d (diff)
downloadtdebase-83e845857283fe358635b48709c649f90665edc6.tar.gz
tdebase-83e845857283fe358635b48709c649f90665edc6.zip
Fixed user configurability of icon text box corners
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1177588 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/kfileividesktop.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/kdesktop/kfileividesktop.cpp b/kdesktop/kfileividesktop.cpp
index 90c6a213d..d5e367bc0 100644
--- a/kdesktop/kfileividesktop.cpp
+++ b/kdesktop/kfileividesktop.cpp
@@ -31,6 +31,7 @@
#include <kwordwrap.h>
#include <kiconview.h>
#include <kdebug.h>
+#include <kglobalsettings.h>
#include <kshadowengine.h>
#include "kdesktopshadowsettings.h"
@@ -138,7 +139,13 @@ bool KFileIVIDesktop::shouldUpdateShadow(bool selected)
void KFileIVIDesktop::drawShadowedText( TQPainter *p, const TQColorGroup &cg )
{
- int textX = textRect( FALSE ).x() + 4;
+ bool drawRoundedRect = KGlobalSettings::iconUseRoundedRect();
+
+ int textX;
+ if (drawRoundedRect == true)
+ textX = textRect( FALSE ).x() + 4;
+ else
+ textX = textRect( FALSE ).x() + 2;
int textY = textRect( FALSE ).y();
int align = ((KIconView *) iconView())->itemTextPos() == TQIconView::Bottom
? AlignHCenter : AlignAuto;
@@ -159,11 +166,16 @@ void KFileIVIDesktop::drawShadowedText( TQPainter *p, const TQColorGroup &cg )
TQRect rect = textRect( false );
rect.setRight( rect.right() - spread );
rect.setBottom( rect.bottom() - spread + 1 );
- p->setBrush( TQBrush( cg.highlight() ) );
- p->setPen( TQPen( cg.highlight() ) );
- p->drawRoundRect( rect,
+ if (drawRoundedRect == true) {
+ p->setBrush( TQBrush( cg.highlight() ) );
+ p->setPen( TQPen( cg.highlight() ) );
+ p->drawRoundRect( rect,
1000 / rect.width(),
- 1000 / rect.height() );
+ 1000 / rect.height() );
+ }
+ else {
+ p->fillRect( textRect( false ), cg.highlight() );
+ }
}
else {
// use shadow