save the last size for formfactor, helps when the applet changes containment and back again
BUG:241857 svn path=/trunk/KDE/kdelibs/; revision=1138648
This commit is contained in:
parent
404981d52b
commit
c2d8eee98a
10
applet.cpp
10
applet.cpp
@ -1271,7 +1271,17 @@ void Applet::flushPendingConstraintsEvents()
|
||||
at.rotateRadians(0);
|
||||
setTransform(at);
|
||||
}
|
||||
|
||||
//was a size saved for a particular form factor?
|
||||
if (d->sizeForFormFactor.contains(f)) {
|
||||
resize(d->sizeForFormFactor.value(f));
|
||||
}
|
||||
}
|
||||
|
||||
if ((c & Plasma::StartupCompletedConstraint) || (c & Plasma::SizeConstraint && !(c & Plasma::FormFactorConstraint))) {
|
||||
d->sizeForFormFactor[formFactor()] = size();
|
||||
}
|
||||
|
||||
if (c & Plasma::SizeConstraint || c & Plasma::FormFactorConstraint) {
|
||||
if (aspectRatioMode() == Plasma::Square || aspectRatioMode() == Plasma::ConstrainedSquare) {
|
||||
// enforce square size in panels
|
||||
|
@ -198,6 +198,9 @@ public:
|
||||
// the applet can change size policy by itself, so save the old one for eventual restore
|
||||
QSizePolicy preferredSizePolicy;
|
||||
|
||||
//keep last sizes for formfactors, useful when the containment changes
|
||||
QHash<FormFactor, QSizeF> sizeForFormFactor;
|
||||
|
||||
// timerEvent bookkeeping
|
||||
QBasicTimer constraintsTimer;
|
||||
QBasicTimer busyWidgetTimer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user