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:
parent
ae5622817c
commit
6743e12499
@ -349,6 +349,8 @@ void Dialog::setGraphicsWidget(QGraphicsWidget *widget)
|
|||||||
|
|
||||||
if (!d->view) {
|
if (!d->view) {
|
||||||
d->view = new QGraphicsView(this);
|
d->view = new QGraphicsView(this);
|
||||||
|
d->view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
d->view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
d->view->setFrameShape(QFrame::NoFrame);
|
d->view->setFrameShape(QFrame::NoFrame);
|
||||||
d->view->viewport()->setAutoFillBackground(false);
|
d->view->viewport()->setAutoFillBackground(false);
|
||||||
layout()->addWidget(d->view);
|
layout()->addWidget(d->view);
|
||||||
|
@ -207,6 +207,14 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
prefSize = qWidget->sizeHint();
|
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;
|
qreal left, top, right, bottom;
|
||||||
q->getContentsMargins(&left, &top, &right, &bottom);
|
q->getContentsMargins(&left, &top, &right, &bottom);
|
||||||
QSizeF oldSize(q->size());
|
QSizeF oldSize(q->size());
|
||||||
|
Loading…
Reference in New Issue
Block a user