removed unused Private::applyBackgroundHints
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801416
This commit is contained in:
parent
eff92e33d7
commit
26732125cc
62
applet.cpp
62
applet.cpp
@ -312,68 +312,6 @@ public:
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyBackgroundHints(const BackgroundHints hints)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
backgroundHints = hints;
|
|
||||||
|
|
||||||
//Draw the standard background?
|
|
||||||
if (hints & StandardBackground) {
|
|
||||||
if (!background) {
|
|
||||||
background = new Plasma::PanelSvg();
|
|
||||||
background->setImagePath("widgets/background");
|
|
||||||
background->setEnabledBorders(Plasma::PanelSvg::AllBorders);
|
|
||||||
int left, top, right, bottom;
|
|
||||||
getBorderSize(left, top, right, bottom);
|
|
||||||
setContentsMargins(left, right, top, bottom);
|
|
||||||
|
|
||||||
QSizeF fitSize(left + right, top + bottom);
|
|
||||||
if (minimumSize().expandedTo(fitSize) != minimumSize()) {
|
|
||||||
setMinimumSize(minimumSize().expandedTo(fitSize));
|
|
||||||
}
|
|
||||||
background->resizePanel(boundingRect().size());
|
|
||||||
}
|
|
||||||
} else if (background) {
|
|
||||||
int left, top, right, bottom;
|
|
||||||
getBorderSize(left, top, right, bottom);
|
|
||||||
//Setting a minimum size of 0,0 would result in the panel to be only
|
|
||||||
//on the first virtual desktop
|
|
||||||
setMinimumSize(qMax(minimumSize().width() - left - right, 1.0),
|
|
||||||
qMax(minimumSize().height() - top - bottom, 1.0));
|
|
||||||
|
|
||||||
delete d->background;
|
|
||||||
background = 0;
|
|
||||||
setContentsMargins(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Draw the shadow?
|
|
||||||
//There are various problems with shadows right now:
|
|
||||||
//
|
|
||||||
//1) shadows can be seen through translucent areas, which is probably technically correct ubt
|
|
||||||
//looks odd
|
|
||||||
//2) the shape of the item odesn't conform to the shape of the standard background, e.g. with
|
|
||||||
//rounded corners
|
|
||||||
#ifdef DYNAMIC_SHADOWS
|
|
||||||
if (hints & ShadowedBackground) {
|
|
||||||
if (shadow) {
|
|
||||||
shadow->setVisible(true);
|
|
||||||
} else {
|
|
||||||
shadow = new ShadowItem(this);
|
|
||||||
if (scene()) {
|
|
||||||
scene()->addItem(d->shadow);
|
|
||||||
shadow->show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
delete d->shadow;
|
|
||||||
shadow = 0;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
Q_UNUSED(shown);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: examine the usage of memory here; there's a pretty large
|
//TODO: examine the usage of memory here; there's a pretty large
|
||||||
// number of members at this point.
|
// number of members at this point.
|
||||||
static uint s_maxAppletId;
|
static uint s_maxAppletId;
|
||||||
|
12
applet.h
12
applet.h
@ -452,15 +452,10 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
|||||||
*/
|
*/
|
||||||
BackgroundHints backgroundHints() const;
|
BackgroundHints backgroundHints() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets whether or not this Applet is acting as a Containment
|
|
||||||
*/
|
|
||||||
void setIsContainment(bool isContainment);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if this Applet is currently being used as a Containment, false otherwise
|
* @return true if this Applet is currently being used as a Containment, false otherwise
|
||||||
*/
|
*/
|
||||||
bool isContainment() const;
|
bool actAsContainment() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the geometry of this Plasma::Applet. Should not be used directly by
|
* Sets the geometry of this Plasma::Applet. Should not be used directly by
|
||||||
@ -661,6 +656,11 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
|||||||
**/
|
**/
|
||||||
QString instanceName() const;
|
QString instanceName() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether or not this Applet is acting as a Containment
|
||||||
|
*/
|
||||||
|
void setActAsContainment(bool isContainment);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the BackgroundHints for this applet @see BackgroundHint
|
* Sets the BackgroundHints for this applet @see BackgroundHint
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user