Replace reflection by generated drop shadows in sidebar

The sidebar is a diffuse surface. Hence the reflection
does not really make sense there. Additionally, this
allows us to get more unified spacing and we can apply
the same shadow to system icons.
This commit is contained in:
Jens Bache-Wiig
2010-03-15 17:09:57 +01:00
parent 1ded9ce798
commit 40aa17a2e2
12 changed files with 61 additions and 5 deletions

View File

@@ -158,8 +158,9 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
if (!buildConfiguration.isNull())
iconRect.adjust(0, 0, 0, -lineHeight - 4);
QPoint center = iconRect.center();
painter.drawPixmap(center-QPointF(halfPixSize.width()-1, halfPixSize.height()-1), pix);
Utils::StyleHelper::drawIconWithShadow(pix, center-QPoint(halfPixSize.width()-1, halfPixSize.height()-1), &painter);
painter.setFont(normalFont);
QPoint textOffset = center - QPoint(pix.rect().width()/2, pix.rect().height()/2);
@@ -199,7 +200,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
}
} else {
QPoint center = rect().center();
painter.drawPixmap(center-QPointF(halfPixSize.width()-1, halfPixSize.height()-1), pix);
Utils::StyleHelper::drawIconWithShadow(pix, center-QPoint(halfPixSize.width()-1, halfPixSize.height()-1), &painter);
}
}