making the theme more complex wasn't such a good idea
svn path=/trunk/KDE/kdelibs/; revision=882952
This commit is contained in:
parent
55d96b1cfc
commit
c94f93e4ef
@ -224,6 +224,8 @@ void PushButton::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
|
||||
if (d->background) {
|
||||
//resize all four panels
|
||||
d->background->setElementPrefix("pressed");
|
||||
d->background->resizeFrame(size());
|
||||
d->background->setElementPrefix("focus");
|
||||
d->background->resizeFrame(size());
|
||||
|
||||
@ -231,8 +233,6 @@ void PushButton::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
|
||||
d->background->setElementPrefix("active");
|
||||
d->background->resizeFrame(d->activeRect.size());
|
||||
d->background->setElementPrefix("pressed");
|
||||
d->background->resizeFrame(d->activeRect.size());
|
||||
|
||||
d->background->setElementPrefix("normal");
|
||||
d->background->resizeFrame(size());
|
||||
@ -254,15 +254,13 @@ void PushButton::paint(QPainter *painter,
|
||||
|
||||
//Normal button, pressed or not
|
||||
if (isEnabled()) {
|
||||
QPointF topLeft(0,0);
|
||||
if (nativeWidget()->isDown()) {
|
||||
d->background->setElementPrefix("pressed");
|
||||
topLeft = d->activeRect.topLeft();
|
||||
} else {
|
||||
d->background->setElementPrefix("normal");
|
||||
}
|
||||
if (d->animId == -1) {
|
||||
d->background->paintFrame(painter, topLeft);
|
||||
d->background->paintFrame(painter);
|
||||
}
|
||||
//flat or disabled
|
||||
} else if (!isEnabled() || nativeWidget()->isFlat()) {
|
||||
|
@ -235,7 +235,7 @@ void ToolButton::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
|
||||
if (d->background) {
|
||||
//resize all four panels
|
||||
d->background->setElementPrefix("toolbutton-pressed");
|
||||
d->background->setElementPrefix("pressed");
|
||||
d->background->resizeFrame(size());
|
||||
d->background->setElementPrefix("focus");
|
||||
d->background->resizeFrame(size());
|
||||
@ -273,7 +273,7 @@ void ToolButton::paint(QPainter *painter,
|
||||
|
||||
if (d->animId || !button->autoRaise() || (buttonOpt.state & QStyle::State_MouseOver) || (buttonOpt.state & QStyle::State_On)) {
|
||||
if (button->isDown() || (buttonOpt.state & QStyle::State_On)) {
|
||||
d->background->setElementPrefix("toolbutton-pressed");
|
||||
d->background->setElementPrefix("pressed");
|
||||
} else {
|
||||
d->background->setElementPrefix("normal");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user