use the active rect for the focus rect

svn path=/trunk/KDE/kdelibs/; revision=1039127
This commit is contained in:
Marco Martin 2009-10-22 19:28:19 +00:00
parent 4dc1ee533d
commit 905f3960da

View File

@ -309,13 +309,13 @@ void PushButton::resizeEvent(QGraphicsSceneResizeEvent *event)
//resize all four panels
d->background->setElementPrefix("pressed");
d->background->resizeFrame(size());
d->background->setElementPrefix("focus");
d->background->resizeFrame(size());
d->syncActiveRect();
d->background->setElementPrefix("active");
d->background->resizeFrame(d->activeRect.size());
d->background->setElementPrefix("focus");
d->background->resizeFrame(d->activeRect.size());
d->background->setElementPrefix("normal");
d->background->resizeFrame(size());
@ -374,7 +374,7 @@ void PushButton::paint(QPainter *painter,
if (nativeWidget()->hasFocus()) {
d->background->setElementPrefix("focus");
d->background->paintFrame(painter);
d->background->paintFrame(painter, d->activeRect.topLeft());
}
painter->setPen(Plasma::Theme::defaultTheme()->color(Theme::ButtonTextColor));