Improve icon location and size as well as the applet's background in group mode.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692618
This commit is contained in:
Aaron Eisenberg 2007-07-26 01:45:06 +00:00
parent 120bcd5766
commit 52514c1c35

View File

@ -494,11 +494,11 @@ void Applet::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QW
d->paintHover(painter, this);
} else if (zoomLevel == scalingFactor(Plasma::GroupZoom)) { // Show Groups + Applet outline
//TODO: make pretty.
painter->drawRoundRect(boundingRect());
int midX = x() + (boundingRect().width() / 2);
int midY = y() + (boundingRect().height() / 2);
//int iconSize = KIconLoader().currentSize(Desktop);
KIcon(icon()).paint(painter, midX, midY, 64, 64);
painter->fillRect(boundingRect(), QBrush(QColor(20, 20, 20, 200)));
int iconDim = KIconLoader().currentSize(K3Icon::Desktop);
int midX = (boundingRect().width() / 2) - (iconDim / 2);
int midY = (boundingRect().height() / 2 )- (iconDim / 2);
KIcon(icon()).paint(painter, midX, midY, iconDim, iconDim);
}/* else if (zoomLevel == scalingFactor(Plasma::OverviewZoom)) { //Show Groups only
} */
}