cleared a bit of useless lines for the layouting, some wrong that made

the icon to not resize with the panel and set as constrainedsquare, as
applet icons should be

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857535
This commit is contained in:
Marco Martin 2008-09-05 16:24:32 +00:00
parent b244d65ec5
commit cd4565ce3d

View File

@ -128,14 +128,11 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
d->icon = new Plasma::Icon(KIcon("icons"), QString(), this);
}
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
setMaximumSize(INT_MAX, INT_MAX);
d->layout = new QGraphicsLinearLayout(this);
d->layout->setContentsMargins(0, 0, 0, 0);
d->layout->setSpacing(0);
d->layout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
d->layout->setMaximumSize(INT_MAX, INT_MAX);
d->layout->setOrientation(Qt::Horizontal);
setAspectRatioMode(Plasma::ConstrainedSquare);
setLayout(d->layout);
connect(d->icon, SIGNAL(clicked()), this, SLOT(togglePopup()));
@ -242,10 +239,6 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
d->dialog->adjustSize();
d->layout->addItem(d->icon);
setMinimumSize(QSizeF(0, 0));
setMaximumWidth(containment()->size().height());
setMaximumHeight(containment()->size().height());
break;
}
}