use the active rect for the focus rect
svn path=/trunk/KDE/kdelibs/; revision=1039127
This commit is contained in:
parent
4dc1ee533d
commit
905f3960da
@ -309,13 +309,13 @@ void PushButton::resizeEvent(QGraphicsSceneResizeEvent *event)
|
|||||||
//resize all four panels
|
//resize all four panels
|
||||||
d->background->setElementPrefix("pressed");
|
d->background->setElementPrefix("pressed");
|
||||||
d->background->resizeFrame(size());
|
d->background->resizeFrame(size());
|
||||||
d->background->setElementPrefix("focus");
|
|
||||||
d->background->resizeFrame(size());
|
|
||||||
|
|
||||||
d->syncActiveRect();
|
d->syncActiveRect();
|
||||||
|
|
||||||
d->background->setElementPrefix("active");
|
d->background->setElementPrefix("active");
|
||||||
d->background->resizeFrame(d->activeRect.size());
|
d->background->resizeFrame(d->activeRect.size());
|
||||||
|
d->background->setElementPrefix("focus");
|
||||||
|
d->background->resizeFrame(d->activeRect.size());
|
||||||
|
|
||||||
d->background->setElementPrefix("normal");
|
d->background->setElementPrefix("normal");
|
||||||
d->background->resizeFrame(size());
|
d->background->resizeFrame(size());
|
||||||
@ -374,7 +374,7 @@ void PushButton::paint(QPainter *painter,
|
|||||||
|
|
||||||
if (nativeWidget()->hasFocus()) {
|
if (nativeWidget()->hasFocus()) {
|
||||||
d->background->setElementPrefix("focus");
|
d->background->setElementPrefix("focus");
|
||||||
d->background->paintFrame(painter);
|
d->background->paintFrame(painter, d->activeRect.topLeft());
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->setPen(Plasma::Theme::defaultTheme()->color(Theme::ButtonTextColor));
|
painter->setPen(Plasma::Theme::defaultTheme()->color(Theme::ButtonTextColor));
|
||||||
|
Loading…
Reference in New Issue
Block a user