Reset the angle of an applet when moved to a panel

This way, applets that were rotated in Plasma::Planar are not
rotated anymore when moved to form factor Plasma::Horizontal ||
Plasma::Vertical.

BUG:237861

svn path=/trunk/KDE/kdelibs/; revision=1127712
This commit is contained in:
Artur Duque de Souza 2010-05-17 12:40:37 +00:00
parent bf5beef483
commit d6c0119d69

View File

@ -1264,6 +1264,13 @@ void Applet::flushPendingConstraintsEvents()
delete item; delete item;
} }
} }
// avoid putting rotated applets in panels
if (f == Vertical || f == Horizontal) {
QTransform at;
at.rotateRadians(0);
setTransform(at);
}
} }
if (c & Plasma::SizeConstraint || c & Plasma::FormFactorConstraint) { if (c & Plasma::SizeConstraint || c & Plasma::FormFactorConstraint) {
if (aspectRatioMode() == Plasma::Square || aspectRatioMode() == Plasma::ConstrainedSquare) { if (aspectRatioMode() == Plasma::Square || aspectRatioMode() == Plasma::ConstrainedSquare) {