never set big minimum sizes in panels

and don't use scrollbars in the popup views

svn path=/trunk/KDE/kdelibs/; revision=888095
This commit is contained in:
Marco Martin 2008-11-23 19:24:49 +00:00
parent ae5622817c
commit 6743e12499
2 changed files with 10 additions and 0 deletions

View File

@ -349,6 +349,8 @@ void Dialog::setGraphicsWidget(QGraphicsWidget *widget)
if (!d->view) {
d->view = new QGraphicsView(this);
d->view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
d->view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
d->view->setFrameShape(QFrame::NoFrame);
d->view->viewport()->setAutoFillBackground(false);
layout()->addWidget(d->view);

View File

@ -207,6 +207,14 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
prefSize = qWidget->sizeHint();
}
//we could be on a big panel, but in that case we will be able to resize
//more than the natural minimum size, because we'll transform into an icon
if (f == Plasma::Horizontal) {
minimum.setHeight(0);
} else if (f == Plasma::Vertical) {
minimum.setWidth(0);
}
qreal left, top, right, bottom;
q->getContentsMargins(&left, &top, &right, &bottom);
QSizeF oldSize(q->size());