set a custom geometry also in init, not only when the size doesn't change, because it can happen that the size will never change (so the focusindicator staying at the wrong size)
svn path=/trunk/KDE/kdelibs/; revision=1214258
This commit is contained in:
parent
e3ab2c5924
commit
8e152270ce
@ -79,6 +79,11 @@ SpinBox::SpinBox(QGraphicsWidget *parent)
|
||||
d->style = Plasma::Style::sharedStyle();
|
||||
native->setStyle(d->style.data());
|
||||
d->initTheming();
|
||||
|
||||
QStyleOptionSpinBox spinOpt;
|
||||
spinOpt.initFrom(nativeWidget());
|
||||
QRect controlrect = nativeWidget()->style()->subControlRect(QStyle::CC_SpinBox, &spinOpt, QStyle::SC_SpinBoxFrame, nativeWidget());
|
||||
d->focusIndicator->setCustomGeometry(controlrect);
|
||||
}
|
||||
|
||||
SpinBox::~SpinBox()
|
||||
@ -161,6 +166,7 @@ void SpinBox::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
QStyleOptionSpinBox spinOpt;
|
||||
spinOpt.initFrom(nativeWidget());
|
||||
QRect controlrect = nativeWidget()->style()->subControlRect(QStyle::CC_SpinBox, &spinOpt, QStyle::SC_SpinBoxFrame, nativeWidget());
|
||||
|
||||
if (d->focusIndicator) {
|
||||
d->focusIndicator->setCustomGeometry(controlrect);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user