make plasma applets yield space for greedy applets.
svn path=/trunk/KDE/kdelibs/; revision=915261
This commit is contained in:
parent
60e3019818
commit
9eab58a6b2
15
applet.cpp
15
applet.cpp
@ -988,27 +988,22 @@ void Applet::flushPendingConstraintsEvents()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c & Plasma::SizeConstraint || c & Plasma::FormFactorConstraint) {
|
if (c & Plasma::SizeConstraint || c & Plasma::FormFactorConstraint) {
|
||||||
if (aspectRatioMode() == Plasma::Square) {
|
if (aspectRatioMode() == Plasma::Square || aspectRatioMode() == Plasma::ConstrainedSquare) {
|
||||||
// enforce square size in panels
|
// enforce square size in panels
|
||||||
if (formFactor() == Horizontal) {
|
if (formFactor() == Horizontal) {
|
||||||
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
|
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
|
||||||
} else if (formFactor() == Vertical) {
|
} else if (formFactor() == Vertical) {
|
||||||
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
|
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
updateGeometry();
|
|
||||||
} else if (aspectRatioMode() == Plasma::ConstrainedSquare) {
|
|
||||||
// enforce a constrained square size in panels
|
|
||||||
if (formFactor() == Horizontal) {
|
if (formFactor() == Horizontal) {
|
||||||
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
|
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding));
|
||||||
} else if (formFactor() == Vertical) {
|
} else if (formFactor() == Vertical) {
|
||||||
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
|
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateGeometry();
|
|
||||||
}
|
}
|
||||||
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
// now take care of constraints in special subclasses: Contaiment and PopupApplet
|
// now take care of constraints in special subclasses: Contaiment and PopupApplet
|
||||||
|
Loading…
Reference in New Issue
Block a user