SVN_SILENT: some white space fixes i didn't want to mix in with the functional changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677816
This commit is contained in:
parent
b2da6b36ac
commit
a3b156c7d8
@ -101,6 +101,7 @@ class Icon::Private
|
|||||||
button1Pressed = false;
|
button1Pressed = false;
|
||||||
button1Hovered = false;
|
button1Hovered = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
~Private() {}
|
~Private() {}
|
||||||
enum ButtonState
|
enum ButtonState
|
||||||
{
|
{
|
||||||
@ -214,8 +215,7 @@ void Icon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||||||
qreal ih = d->iconSize.height();
|
qreal ih = d->iconSize.height();
|
||||||
qreal deltaX = (d->size.width() - iw) / 2;
|
qreal deltaX = (d->size.width() - iw) / 2;
|
||||||
qreal deltaY = (d->size.height() - ih) / 2 ;
|
qreal deltaY = (d->size.height() - ih) / 2 ;
|
||||||
if(d->state == Private::PressedState)
|
if (d->state == Private::PressedState) {
|
||||||
{
|
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->setRenderHint(QPainter::SmoothPixmapTransform);
|
painter->setRenderHint(QPainter::SmoothPixmapTransform);
|
||||||
painter->scale(0.95, 0.95);
|
painter->scale(0.95, 0.95);
|
||||||
@ -224,9 +224,7 @@ void Icon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||||||
painter->drawPixmap((int)(deltaX + (iw * .025)), (int)(deltaY + (ih * .025)),
|
painter->drawPixmap((int)(deltaX + (iw * .025)), (int)(deltaY + (ih * .025)),
|
||||||
d->icon.pixmap(d->iconSize.toSize()));
|
d->icon.pixmap(d->iconSize.toSize()));
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
painter->drawPixmap((int)deltaX, (int)deltaY, d->icon.pixmap(d->iconSize.toSize()));
|
painter->drawPixmap((int)deltaX, (int)deltaY, d->icon.pixmap(d->iconSize.toSize()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,7 +261,6 @@ void Icon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||||||
|
|
||||||
// Draw top-left button
|
// Draw top-left button
|
||||||
if (d->button1AnimId) {
|
if (d->button1AnimId) {
|
||||||
// painter->drawPixmap(6, 6, buttonPixmap());
|
|
||||||
painter->drawPixmap(6, 6, Phase::self()->animationResult(d->button1AnimId));
|
painter->drawPixmap(6, 6, Phase::self()->animationResult(d->button1AnimId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user