1 regression down! Reenabling and changing one of the layout workarounds fixes the incorrect sizehints problem for detached extenderitems, while still allowing

for items on the desktop to be resized, which is even beter then it was in 4.2. I might backport depending on how good this works with Qt4.4 and depending on 
how complex the patch would become (it would need a few of the changes from my previous monsterpatch).


svn path=/trunk/KDE/kdelibs/; revision=923944
This commit is contained in:
Rob Scheepmaker 2009-02-09 19:21:59 +00:00
parent fe805eb338
commit 6ce839cc08
4 changed files with 5 additions and 13 deletions

View File

@ -509,17 +509,12 @@ void ExtenderPrivate::loadExtenderItems()
void ExtenderPrivate::updateBorders()
{
foreach (ExtenderItem *item, q->attachedItems()) {
kDebug() << "checking" << (QObject*)item << item->d->background->enabledBorders()
<< q->enabledBordersForItem(item);
if (item && (item->d->background->enabledBorders() != q->enabledBordersForItem(item))) {
//call themeChanged to change the backgrounds enabled borders, and move all contained
//widgets according to it's changed margins.
item->d->themeChanged();
}
}
applet->updateGeometry();
applet->adjustSize();
}
void ExtenderPrivate::updateEmptyExtenderLabel()

View File

@ -845,11 +845,9 @@ void ExtenderItemPrivate::updateSizeHints()
if (extender->d->appearance == Extender::TopDownStacked ||
extender->d->appearance == Extender::BottomUpStacked) {
//used in popups, so fixed make sense.
kDebug() << "updating size hints for stacked look, vertical policy is fixed";
q->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
} else if (extender->d->appearance == Extender::NoBorders) {
//on the desktop or panel so take all the space we want.
kDebug() << "updating size hints for no borders look, both policies are expanding";
q->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
}

View File

@ -30,6 +30,7 @@ namespace Plasma
ExtenderApplet::ExtenderApplet(QObject *parent, const QVariantList &args)
: PopupApplet(parent, args)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
}
ExtenderApplet::~ExtenderApplet()
@ -51,8 +52,8 @@ void ExtenderApplet::init()
connect(extender(), SIGNAL(itemDetached(Plasma::ExtenderItem*)),
this, SLOT(itemDetached(Plasma::ExtenderItem*)));
//connect(extender(), SIGNAL(geometryChanged()),
//this, SLOT(extenderGeometryChanged()));
connect(extender(), SIGNAL(geometryChanged()),
this, SLOT(extenderGeometryChanged()));
}
void ExtenderApplet::itemDetached(Plasma::ExtenderItem *)
@ -62,7 +63,6 @@ void ExtenderApplet::itemDetached(Plasma::ExtenderItem *)
}
}
/**
void ExtenderApplet::extenderGeometryChanged()
{
if (formFactor() != Plasma::Horizontal &&
@ -76,10 +76,9 @@ void ExtenderApplet::extenderGeometryChanged()
setMaximumSize(extender()->maximumSize() + margins);
setPreferredSize(extender()->preferredSize() + margins);
adjustSize();
updateGeometry();
}
}
*/
} // namespace Plasma

View File

@ -41,7 +41,7 @@ class ExtenderApplet : public Plasma::PopupApplet
public Q_SLOTS:
void itemDetached(Plasma::ExtenderItem *);
//void extenderGeometryChanged();
void extenderGeometryChanged();
};
} // namespace Plasma