begone you wretched tabs.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797216
This commit is contained in:
parent
1a59ca8215
commit
6a13421595
@ -729,7 +729,7 @@ void Applet::setDrawStandardBackground(bool drawBackground)
|
|||||||
d->background->setBorderFlags(Plasma::SvgPanel::DrawAllBorders);
|
d->background->setBorderFlags(Plasma::SvgPanel::DrawAllBorders);
|
||||||
int left, top, right, bottom;
|
int left, top, right, bottom;
|
||||||
d->getBorderSize(left, top, right, bottom);
|
d->getBorderSize(left, top, right, bottom);
|
||||||
QSizeF fitSize(left + right, top + bottom);
|
QSizeF fitSize(left + right, top + bottom);
|
||||||
if (minimumSize().expandedTo(fitSize) != minimumSize()) {
|
if (minimumSize().expandedTo(fitSize) != minimumSize()) {
|
||||||
setMinimumSize(minimumSize().expandedTo(fitSize));
|
setMinimumSize(minimumSize().expandedTo(fitSize));
|
||||||
}
|
}
|
||||||
@ -997,7 +997,7 @@ void Applet::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QW
|
|||||||
}
|
}
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
if (transform().isRotating()) {
|
if (transform().isRotating()) {
|
||||||
painter->setRenderHint(QPainter::SmoothPixmapTransform);
|
painter->setRenderHint(QPainter::SmoothPixmapTransform);
|
||||||
painter->setRenderHint(QPainter::Antialiasing);
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
@ -1526,7 +1526,7 @@ void Applet::setGeometry(const QRectF& geometry)
|
|||||||
if (geometry.topLeft() != beforeGeom.topLeft())
|
if (geometry.topLeft() != beforeGeom.topLeft())
|
||||||
{
|
{
|
||||||
if (d->background) {
|
if (d->background) {
|
||||||
|
|
||||||
kDebug() << QGraphicsWidget::geometry();
|
kDebug() << QGraphicsWidget::geometry();
|
||||||
}
|
}
|
||||||
emit geometryChanged();
|
emit geometryChanged();
|
||||||
|
@ -493,9 +493,9 @@ void Containment::createLayout(FormFactor formFactor)
|
|||||||
case Horizontal: {
|
case Horizontal: {
|
||||||
QGraphicsLinearLayout *lay = new QGraphicsLinearLayout();
|
QGraphicsLinearLayout *lay = new QGraphicsLinearLayout();
|
||||||
lay->setOrientation(Qt::Horizontal);
|
lay->setOrientation(Qt::Horizontal);
|
||||||
lay->setContentsMargins(0, 0, 0, 0);
|
lay->setContentsMargins(0, 0, 0, 0);
|
||||||
lay->setSpacing(4);
|
lay->setSpacing(4);
|
||||||
setLayout(lay);
|
setLayout(lay);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Vertical: {
|
case Vertical: {
|
||||||
@ -503,7 +503,7 @@ void Containment::createLayout(FormFactor formFactor)
|
|||||||
lay->setOrientation(Qt::Vertical);
|
lay->setOrientation(Qt::Vertical);
|
||||||
lay->setContentsMargins(0, 0, 0, 0);
|
lay->setContentsMargins(0, 0, 0, 0);
|
||||||
lay->setSpacing(4);
|
lay->setSpacing(4);
|
||||||
setLayout(lay);
|
setLayout(lay);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -660,7 +660,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
|||||||
// Calculate where the user wants the applet to go before adding it
|
// Calculate where the user wants the applet to go before adding it
|
||||||
//so long as this isn't a new applet with a delayed init
|
//so long as this isn't a new applet with a delayed init
|
||||||
if (! delayInit || (currentContainment && currentContainment != this)) {
|
if (! delayInit || (currentContainment && currentContainment != this)) {
|
||||||
index = indexAt(pos);
|
index = indexAt(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -668,7 +668,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
|||||||
applet->removeSceneEventFilter(currentContainment);
|
applet->removeSceneEventFilter(currentContainment);
|
||||||
KConfigGroup oldConfig = applet->config();
|
KConfigGroup oldConfig = applet->config();
|
||||||
currentContainment->d->applets.removeAll(applet);
|
currentContainment->d->applets.removeAll(applet);
|
||||||
applet->setParentItem(this);
|
applet->setParentItem(this);
|
||||||
|
|
||||||
// now move the old config to the new location
|
// now move the old config to the new location
|
||||||
KConfigGroup c = config().group("Applets").group(QString::number(applet->id()));
|
KConfigGroup c = config().group("Applets").group(QString::number(applet->id()));
|
||||||
@ -703,15 +703,14 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
|||||||
applet->setPos(pos);
|
applet->setPos(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
QGraphicsLinearLayout *l = dynamic_cast<QGraphicsLinearLayout *>(lay);
|
QGraphicsLinearLayout *l = dynamic_cast<QGraphicsLinearLayout *>(lay);
|
||||||
if (l) {
|
if (l) {
|
||||||
l->addItem(applet);
|
l->addItem(applet);
|
||||||
}
|
}
|
||||||
//l->addStretch();
|
//l->addStretch();
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareApplet(applet, delayInit); //must at least flush constraints
|
prepareApplet(applet, delayInit); //must at least flush constraints
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//containment-relative pos... right?
|
//containment-relative pos... right?
|
||||||
|
Loading…
Reference in New Issue
Block a user