fix the panel size loading
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=788869
This commit is contained in:
parent
00da2bec77
commit
3a6c262665
@ -198,7 +198,17 @@ void Containment::loadConstraints(KConfigGroup* group)
|
|||||||
kDebug() << " geom:" << group->readEntry("geometry", geometry());
|
kDebug() << " geom:" << group->readEntry("geometry", geometry());
|
||||||
kDebug() << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
|
kDebug() << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
|
||||||
kDebug() << " screen:" << group->readEntry("screen", d->screen);*/
|
kDebug() << " screen:" << group->readEntry("screen", d->screen);*/
|
||||||
setGeometry(group->readEntry("geometry", geometry()));
|
|
||||||
|
QRectF geo = group->readEntry("geometry", geometry());
|
||||||
|
//override max/min
|
||||||
|
if (geo.size() != geo.size().boundedTo(maximumSize())) {
|
||||||
|
setMaximumSize(maximumSize().expandedTo(geo.size()));
|
||||||
|
}
|
||||||
|
if (geo.size() != geo.size().expandedTo(minimumSize())) {
|
||||||
|
setMinimumSize(minimumSize().boundedTo(geo.size()));
|
||||||
|
}
|
||||||
|
setGeometry(geo);
|
||||||
|
|
||||||
setLocation((Plasma::Location)group->readEntry("location", (int)d->location));
|
setLocation((Plasma::Location)group->readEntry("location", (int)d->location));
|
||||||
setFormFactor((Plasma::FormFactor)group->readEntry("formfactor", (int)d->formFactor));
|
setFormFactor((Plasma::FormFactor)group->readEntry("formfactor", (int)d->formFactor));
|
||||||
setScreen(group->readEntry("screen", d->screen));
|
setScreen(group->readEntry("screen", d->screen));
|
||||||
|
@ -333,6 +333,7 @@ void Corona::loadDefaultSetup()
|
|||||||
Containment* panel = addContainment("panel");
|
Containment* panel = addContainment("panel");
|
||||||
panel->setScreen(topLeftScreen);
|
panel->setScreen(topLeftScreen);
|
||||||
panel->setLocation(Plasma::BottomEdge);
|
panel->setLocation(Plasma::BottomEdge);
|
||||||
|
panel->flushUpdatedConstraints();
|
||||||
|
|
||||||
// some default applets to get a usable UI
|
// some default applets to get a usable UI
|
||||||
panel->addApplet("launcher");
|
panel->addApplet("launcher");
|
||||||
@ -344,7 +345,6 @@ void Corona::loadDefaultSetup()
|
|||||||
|
|
||||||
// trigger an instant layout so we immediately have a proper geometry rather than waiting around
|
// trigger an instant layout so we immediately have a proper geometry rather than waiting around
|
||||||
// for the event loop
|
// for the event loop
|
||||||
panel->flushUpdatedConstraints();
|
|
||||||
if (panel->layout()) {
|
if (panel->layout()) {
|
||||||
panel->layout()->invalidate();
|
panel->layout()->invalidate();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user