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:
parent
b244d65ec5
commit
cd4565ce3d
@ -128,14 +128,11 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
|
|||||||
d->icon = new Plasma::Icon(KIcon("icons"), QString(), this);
|
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 = new QGraphicsLinearLayout(this);
|
||||||
d->layout->setContentsMargins(0, 0, 0, 0);
|
d->layout->setContentsMargins(0, 0, 0, 0);
|
||||||
d->layout->setSpacing(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);
|
d->layout->setOrientation(Qt::Horizontal);
|
||||||
|
setAspectRatioMode(Plasma::ConstrainedSquare);
|
||||||
setLayout(d->layout);
|
setLayout(d->layout);
|
||||||
|
|
||||||
connect(d->icon, SIGNAL(clicked()), this, SLOT(togglePopup()));
|
connect(d->icon, SIGNAL(clicked()), this, SLOT(togglePopup()));
|
||||||
@ -242,10 +239,6 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
|
|||||||
d->dialog->adjustSize();
|
d->dialog->adjustSize();
|
||||||
d->layout->addItem(d->icon);
|
d->layout->addItem(d->icon);
|
||||||
|
|
||||||
setMinimumSize(QSizeF(0, 0));
|
|
||||||
setMaximumWidth(containment()->size().height());
|
|
||||||
setMaximumHeight(containment()->size().height());
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user