make the applets to behave well when resizing the panel
as a bonus, applets with standard background appears a little bit less wrong (but still wrong) on the desktop svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798154
This commit is contained in:
parent
c1a93efbdf
commit
8c41b89090
@ -195,6 +195,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applet->setDrawStandardBackground(true);
|
applet->setDrawStandardBackground(true);
|
||||||
|
|
||||||
connect(Plasma::Theme::self(), SIGNAL(changed()), applet, SLOT(themeChanged()));
|
connect(Plasma::Theme::self(), SIGNAL(changed()), applet, SLOT(themeChanged()));
|
||||||
@ -729,10 +730,7 @@ void Applet::setDrawStandardBackground(bool drawBackground)
|
|||||||
d->background->setEnabledBorders(Plasma::PanelSvg::AllBorders);
|
d->background->setEnabledBorders(Plasma::PanelSvg::AllBorders);
|
||||||
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);
|
setContentsMargins(left, right, top, bottom);
|
||||||
if (minimumSize().expandedTo(fitSize) != minimumSize()) {
|
|
||||||
setMinimumSize(minimumSize().expandedTo(fitSize));
|
|
||||||
}
|
|
||||||
d->background->resize(boundingRect().size());
|
d->background->resize(boundingRect().size());
|
||||||
}
|
}
|
||||||
} else if (d->background) {
|
} else if (d->background) {
|
||||||
|
Loading…
Reference in New Issue
Block a user