diff options
author | François Andriot <albator78@libertysurf.fr> | 2014-06-18 12:56:04 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-06-18 12:56:04 +0900 |
commit | db19d360b6f2abc0796a3789e3b428de68ad120d (patch) | |
tree | 174e37c9c40b7ce56334210372861ca2798d1336 /kcontrol/background/bgdialog.cpp | |
parent | e96ee72ff00de1de77dd4a50fca83cea15d5b549 (diff) | |
download | tdebase-db19d360b6f2abc0796a3789e3b428de68ad120d.tar.gz tdebase-db19d360b6f2abc0796a3789e3b428de68ad120d.zip |
Added smooth crossfade effect option when changing the desktop wallpaper.
Diffstat (limited to 'kcontrol/background/bgdialog.cpp')
-rw-r--r-- | kcontrol/background/bgdialog.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index 9c0cd5e1b..c221a50fe 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -174,6 +174,10 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) connect(m_cbBlendReverse, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotBlendReverse(bool))); + // Crossfading background + connect(m_cbCrossFadeBg, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotCrossFadeBg(bool))); + // advanced options connect(m_buttonAdvanced, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdvanced())); @@ -304,6 +308,7 @@ void BGDialog::makeReadOnly() m_cbBlendReverse->setEnabled( false ); m_buttonAdvanced->setEnabled( false ); m_buttonGetNew->setEnabled( false ); + m_cbCrossFadeBg->setEnabled( false ); } void BGDialog::load( bool useDefaults ) @@ -781,6 +786,8 @@ void BGDialog::updateUI() m_cbBlendReverse->setChecked(r->reverseBlending()); m_sliderBlend->setValue( r->blendBalance() / 10 ); + m_cbCrossFadeBg->setChecked(r->crossFadeBg()); + m_comboBlend->blockSignals(false); m_sliderBlend->blockSignals(false); @@ -1295,6 +1302,17 @@ void BGDialog::slotBlendReverse(bool b) eRenderer()->start(true); } +void BGDialog::slotCrossFadeBg(bool b) +{ + if (b == eRenderer()->crossFadeBg()) + return; + emit changed(true); + + eRenderer()->stop(); + eRenderer()->setCrossFadeBg(b); + eRenderer()->start(true); +} + void BGDialog::desktopResized() { for (unsigned i = 0; i < m_renderer.size(); ++i) |