Setting to disable wobbly windows for resizes or moves separately.
BUG: 167564 svn path=/trunk/KDE/kdebase/workspace/; revision=857060icc-effect-5.14.5
parent
269242303f
commit
0e84aec582
|
@ -275,6 +275,9 @@ WobblyWindowsEffect::WobblyWindowsEffect()
|
||||||
m_closeEffectEnabled = conf.readEntry("CloseEffect", false);
|
m_closeEffectEnabled = conf.readEntry("CloseEffect", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_moveWobble = conf.readEntry("MoveWobble", true);
|
||||||
|
m_resizeWobble = conf.readEntry("ResizeWobble", true);
|
||||||
|
|
||||||
#if defined VERBOSE_MODE
|
#if defined VERBOSE_MODE
|
||||||
kDebug() << "Parameters :\n" <<
|
kDebug() << "Parameters :\n" <<
|
||||||
"move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\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)
|
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))
|
if (!windows.contains(w))
|
||||||
{
|
{
|
||||||
|
|
|
@ -132,6 +132,9 @@ class WobblyWindowsEffect : public Effect
|
||||||
bool m_openEffectEnabled;
|
bool m_openEffectEnabled;
|
||||||
bool m_closeEffectEnabled;
|
bool m_closeEffectEnabled;
|
||||||
|
|
||||||
|
bool m_moveWobble; // Expands m_moveEffectEnabled
|
||||||
|
bool m_resizeWobble;
|
||||||
|
|
||||||
void initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry) const;
|
void initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry) const;
|
||||||
void freeWobblyInfo(WindowWobblyInfos& wwi) const;
|
void freeWobblyInfo(WindowWobblyInfos& wwi) const;
|
||||||
void wobblyOpenInit(WindowWobblyInfos& wwi) const;
|
void wobblyOpenInit(WindowWobblyInfos& wwi) const;
|
||||||
|
|
|
@ -40,6 +40,8 @@ KCModule(EffectFactory::componentData(), parent, args)
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
connect(m_ui.slWobblyness, SIGNAL(valueChanged(int)), this, SLOT(slotSlWobblyness(int)));
|
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();
|
load();
|
||||||
}
|
}
|
||||||
|
@ -71,6 +73,12 @@ void WobblyWindowsEffectConfig::load()
|
||||||
|
|
||||||
m_ui.slWobblyness->setSliderPosition(wobblynessLevel);
|
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);
|
emit changed(change);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +89,9 @@ void WobblyWindowsEffectConfig::save()
|
||||||
conf.writeEntry("Settings", "Auto");
|
conf.writeEntry("Settings", "Auto");
|
||||||
conf.writeEntry("WobblynessLevel", m_ui.slWobblyness->value());
|
conf.writeEntry("WobblynessLevel", m_ui.slWobblyness->value());
|
||||||
|
|
||||||
|
conf.writeEntry("MoveWobble", m_ui.moveBox->isChecked());
|
||||||
|
conf.writeEntry("ResizeWobble", m_ui.resizeBox->isChecked());
|
||||||
|
|
||||||
emit changed(false);
|
emit changed(false);
|
||||||
EffectsHandler::sendReloadMessage("wobblywindows");
|
EffectsHandler::sendReloadMessage("wobblywindows");
|
||||||
}
|
}
|
||||||
|
@ -88,6 +99,8 @@ void WobblyWindowsEffectConfig::save()
|
||||||
void WobblyWindowsEffectConfig::defaults()
|
void WobblyWindowsEffectConfig::defaults()
|
||||||
{
|
{
|
||||||
m_ui.slWobblyness->setSliderPosition(2);
|
m_ui.slWobblyness->setSliderPosition(2);
|
||||||
|
m_ui.moveBox->setChecked( true );
|
||||||
|
m_ui.resizeBox->setChecked( true );
|
||||||
|
|
||||||
emit changed(true);
|
emit changed(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>274</width>
|
<width>279</width>
|
||||||
<height>66</height>
|
<height>113</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout" >
|
<layout class="QGridLayout" name="gridLayout" >
|
||||||
|
@ -58,21 +58,27 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="0" colspan="2" >
|
||||||
<spacer name="verticalSpacer" >
|
<widget class="QCheckBox" name="moveBox" >
|
||||||
<property name="orientation" >
|
<property name="text" >
|
||||||
<enum>Qt::Vertical</enum>
|
<string>Wobble when &moving</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0" >
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>20</width>
|
<item row="3" column="0" colspan="2" >
|
||||||
<height>4</height>
|
<widget class="QCheckBox" name="resizeBox" >
|
||||||
</size>
|
<property name="text" >
|
||||||
|
<string>Wobble when &resizing</string>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>slWobblyness</tabstop>
|
||||||
|
<tabstop>moveBox</tabstop>
|
||||||
|
<tabstop>resizeBox</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in New Issue