Setting to disable wobbly windows for resizes or moves separately.

BUG: 167564

svn path=/trunk/KDE/kdebase/workspace/; revision=857060
This commit is contained in:
Lucas Murray 2008-09-04 15:09:22 +00:00
parent 269242303f
commit 0e84aec582
4 changed files with 39 additions and 13 deletions

View file

@ -275,6 +275,9 @@ WobblyWindowsEffect::WobblyWindowsEffect()
m_closeEffectEnabled = conf.readEntry("CloseEffect", false);
}
m_moveWobble = conf.readEntry("MoveWobble", true);
m_resizeWobble = conf.readEntry("ResizeWobble", true);
#if defined VERBOSE_MODE
kDebug() << "Parameters :\n" <<
"move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\n"
@ -442,7 +445,8 @@ void WobblyWindowsEffect::postPaintScreen()
void WobblyWindowsEffect::windowUserMovedResized(EffectWindow* w, bool first, bool last)
{
if (m_moveEffectEnabled && first && !w->isSpecialWindow())
if (m_moveEffectEnabled && first && !w->isSpecialWindow() &&
((w->isUserMove() && m_moveWobble) || (w->isUserResize() && m_resizeWobble)))
{
if (!windows.contains(w))
{

View file

@ -132,6 +132,9 @@ class WobblyWindowsEffect : public Effect
bool m_openEffectEnabled;
bool m_closeEffectEnabled;
bool m_moveWobble; // Expands m_moveEffectEnabled
bool m_resizeWobble;
void initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry) const;
void freeWobblyInfo(WindowWobblyInfos& wwi) const;
void wobblyOpenInit(WindowWobblyInfos& wwi) const;

View file

@ -40,6 +40,8 @@ KCModule(EffectFactory::componentData(), parent, args)
m_ui.setupUi(this);
connect(m_ui.slWobblyness, SIGNAL(valueChanged(int)), this, SLOT(slotSlWobblyness(int)));
connect(m_ui.moveBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
connect(m_ui.resizeBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
load();
}
@ -71,6 +73,12 @@ void WobblyWindowsEffectConfig::load()
m_ui.slWobblyness->setSliderPosition(wobblynessLevel);
bool moving = conf.readEntry("MoveWobble", true);
m_ui.moveBox->setChecked(moving);
bool resizing = conf.readEntry("ResizeWobble", true);
m_ui.resizeBox->setChecked(resizing);
emit changed(change);
}
@ -81,6 +89,9 @@ void WobblyWindowsEffectConfig::save()
conf.writeEntry("Settings", "Auto");
conf.writeEntry("WobblynessLevel", m_ui.slWobblyness->value());
conf.writeEntry("MoveWobble", m_ui.moveBox->isChecked());
conf.writeEntry("ResizeWobble", m_ui.resizeBox->isChecked());
emit changed(false);
EffectsHandler::sendReloadMessage("wobblywindows");
}
@ -88,6 +99,8 @@ void WobblyWindowsEffectConfig::save()
void WobblyWindowsEffectConfig::defaults()
{
m_ui.slWobblyness->setSliderPosition(2);
m_ui.moveBox->setChecked( true );
m_ui.resizeBox->setChecked( true );
emit changed(true);
}

View file

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>274</width>
<height>66</height>
<width>279</width>
<height>113</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
@ -58,21 +58,27 @@
</item>
</layout>
</item>
<item row="2" column="1" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="moveBox" >
<property name="text" >
<string>Wobble when &amp;moving</string>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>4</height>
</size>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QCheckBox" name="resizeBox" >
<property name="text" >
<string>Wobble when &amp;resizing</string>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>slWobblyness</tabstop>
<tabstop>moveBox</tabstop>
<tabstop>resizeBox</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>