when an extender is created on an applet without an extender and it is a popup applet without an explicitly defined graphicsWidget, make it re-check the layout so it creates a dialog or whatever when appropriate based on having a graphicsWidget now
svn path=/trunk/KDE/kdelibs/; revision=1180038
This commit is contained in:
parent
9d89e5519a
commit
03f8db0342
@ -44,6 +44,7 @@
|
|||||||
#include "private/extenderapplet_p.h"
|
#include "private/extenderapplet_p.h"
|
||||||
#include "private/extenderitem_p.h"
|
#include "private/extenderitem_p.h"
|
||||||
#include "private/extenderitemmimedata_p.h"
|
#include "private/extenderitemmimedata_p.h"
|
||||||
|
#include "private/popupapplet_p.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
@ -91,7 +92,13 @@ Extender::Extender(Applet *applet)
|
|||||||
kWarning() << "Applet already has an extender, and can have only one extender."
|
kWarning() << "Applet already has an extender, and can have only one extender."
|
||||||
<< "The previous extender will be destroyed.";
|
<< "The previous extender will be destroyed.";
|
||||||
delete applet->d->extender.data();
|
delete applet->d->extender.data();
|
||||||
|
} else if (PopupApplet *popup = qobject_cast<PopupApplet *>(applet)) {
|
||||||
|
if (!popup->d->graphicsWidget) {
|
||||||
|
// ensure the popup gets a dialog with us as the graphics widget
|
||||||
|
popup->d->popupConstraintsEvent(SizeConstraint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applet->d->extender = this;
|
applet->d->extender = this;
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user