aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <[email protected]>2016-11-11 11:14:30 +0100
committerMartin Gräßlin <[email protected]>2016-11-15 07:19:26 +0100
commita8fa1626eb9dfc906523ecb026c0c72c3f8bd160 (patch)
tree1757f0ac4458d9a317d403472f4cf4af0bada09e
parent2b93939a67d9ef9d21bc7416fbb6d3e8df292bff (diff)
[effects] Drop loading shadow config from MagicLamp
Summary: This has basically been dead code for ages. The Shadow effect got dropped in an early 4.x version. We shouldn't transform the window based on old shadow values, so completely removed. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3339
-rw-r--r--effects/magiclamp/magiclamp.cpp15
-rw-r--r--effects/magiclamp/magiclamp.h1
2 files changed, 1 insertions, 15 deletions
diff --git a/effects/magiclamp/magiclamp.cpp b/effects/magiclamp/magiclamp.cpp
index 4983862..0a4b0e5 100644
--- a/effects/magiclamp/magiclamp.cpp
+++ b/effects/magiclamp/magiclamp.cpp
@@ -51,19 +51,6 @@ void MagicLampEffect::reconfigure(ReconfigureFlags)
MagicLampConfig::self()->read();
// TODO: rename animationDuration to duration
mAnimationDuration = animationTime(MagicLampConfig::animationDuration() != 0 ? MagicLampConfig::animationDuration() : 250);
-
- KConfigGroup conf = effects->effectConfig(QStringLiteral("MagicLamp"));
- conf = effects->effectConfig(QStringLiteral("Shadow"));
- int v = conf.readEntry("Size", 5);
- v += conf.readEntry("Fuzzyness", 10);
- mShadowOffset[0] = mShadowOffset[1] = -v;
- mShadowOffset[2] = mShadowOffset[3] = v;
- v = conf.readEntry("XOffset", 0);
- mShadowOffset[0] -= v;
- mShadowOffset[2] += v;
- v = conf.readEntry("YOffset", 3);
- mShadowOffset[1] -= v;
- mShadowOffset[3] += v;
}
void MagicLampEffect::prePaintScreen(ScreenPrePaintData& data, int time)
@@ -121,7 +108,7 @@ void MagicLampEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
IconPosition position = Top;
// If there's no icon geometry, minimize to the center of the screen
if (!icon.isValid()) {
- QRect extG = geo.adjusted(mShadowOffset[0], mShadowOffset[1], mShadowOffset[2], mShadowOffset[3]);
+ QRect extG = geo;
QPoint pt = cursorPos();
// focussing inside the window is no good, leads to ugly artefacts, find nearest border
if (extG.contains(pt)) {
diff --git a/effects/magiclamp/magiclamp.h b/effects/magiclamp/magiclamp.h
index 373c993..95865d4 100644
--- a/effects/magiclamp/magiclamp.h
+++ b/effects/magiclamp/magiclamp.h
@@ -62,7 +62,6 @@ private:
QHash< EffectWindow*, QTimeLine* > mTimeLineWindows;
int mActiveAnimations;
int mAnimationDuration;
- int mShadowOffset[4];
enum IconPosition {
Top,