diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-04-13 02:15:34 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-04-14 02:27:29 +0200 |
commit | 30c156db410ab3cf6661a529a7de74a56cb9b40b (patch) | |
tree | 09da7ca768473787ffd5356641900cbc6d8cd11e /twin | |
parent | d755b94c26ffc7c889cf7813842d918460d00cdb (diff) | |
download | tdebase-30c156db410ab3cf6661a529a7de74a56cb9b40b.tar.gz tdebase-30c156db410ab3cf6661a529a7de74a56cb9b40b.zip |
Add GUI option to control panel shadows
This resolves Bug 2189
(cherry picked from commit 296f0f444b173cf4bd735382770082a3a3d825ab)
Diffstat (limited to 'twin')
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.cpp | 17 | ||||
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.h | 1 |
2 files changed, 16 insertions, 2 deletions
diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp index 3e2757545..83769a977 100644 --- a/twin/kcmtwin/twinoptions/windows.cpp +++ b/twin/kcmtwin/twinoptions/windows.cpp @@ -1370,9 +1370,12 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, vLay2->addWidget(useShadowsOnMenuWindows); useShadowsOnToolTipWindows = new TQCheckBox(i18n("Use shadows on tooltips"),sGroup); vLay2->addWidget(useShadowsOnToolTipWindows); + useShadowsOnDockWindows = new TQCheckBox(i18n("Use shadows on panels"),sGroup); + vLay2->addWidget(useShadowsOnDockWindows); if (TDECompositor != "compton-tde") { useShadowsOnMenuWindows->hide(); useShadowsOnToolTipWindows->hide(); + useShadowsOnDockWindows->hide(); } vLay2->addSpacing(11); @@ -1498,6 +1501,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); @@ -1523,6 +1527,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); + connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); load(); @@ -1539,6 +1544,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); + connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); @@ -1566,12 +1572,15 @@ void KTranslucencyConfig::processShadowLockouts() shadowTopOffset->setEnabled(enabled); shadowLeftOffset->setEnabled(enabled); shadowColor->setEnabled(enabled); + + useShadowsOnDockWindows->setEnabled(useShadows->isChecked()); } void KTranslucencyConfig::resetKompmgr() { resetKompmgr_ = TRUE; } + void KTranslucencyConfig::load( void ) { @@ -1619,6 +1628,7 @@ void KTranslucencyConfig::load( void ) useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0); useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",TRUE)); useShadowsOnToolTipWindows->setChecked(conf_.readBoolEntry("ShadowsOnToolTipWindows",TRUE)); + useShadowsOnDockWindows->setChecked(conf_.readBoolEntry("ShadowsOnDockWindows",FALSE)); shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",0))); shadowLeftOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetX",0))); @@ -1688,6 +1698,7 @@ void KTranslucencyConfig::save( void ) conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":""); conf_->writeEntry("ShadowsOnMenuWindows",useShadowsOnMenuWindows->isChecked()); conf_->writeEntry("ShadowsOnToolTipWindows",useShadowsOnToolTipWindows->isChecked()); + conf_->writeEntry("ShadowsOnDockWindows",useShadowsOnDockWindows->isChecked()); conf_->writeEntry("DisableARGB",disableARGB->isChecked()); conf_->writeEntry("useOpenGL",useOpenGL->isChecked()); conf_->writeEntry("blurBackground",blurBackground->isChecked()); @@ -1739,6 +1750,7 @@ void KTranslucencyConfig::save( void ) bool shadows = useShadows->isChecked(); bool shadowsOnMenuWindows = useShadowsOnMenuWindows->isChecked(); bool shadowsOnToolTipWindows = useShadowsOnToolTipWindows->isChecked(); + bool shadowsOnDockWindows = useShadowsOnDockWindows->isChecked(); stream << "fading = " << ((fadeWindows || fadeMenuWindows || fadeOpacity)?"true":"false") << ";\n"; stream << "no-fading-opacitychange = " << (fadeOpacity?"false":"true") << ";\n"; stream << "no-fading-openclose = " << ((fadeWindows||fadeMenuWindows)?"false":"true") << ";\n"; @@ -1759,7 +1771,7 @@ void KTranslucencyConfig::save( void ) stream << " combo = { shadow = false; fade = " << (fadeWindows?"true":"false") << "; no-fading-openclose = " << (fadeWindows?"false":"true") << "; };" << "\n"; stream << " desktop = { shadow = false; fade = " << (fadeWindows?"true":"false") << "; no-fading-openclose = " << (fadeWindows?"false":"true") << "; };" << "\n"; stream << " dnd = { shadow = false; fade = " << (fadeWindows?"true":"false") << "; no-fading-openclose = " << (fadeWindows?"false":"true") << "; };" << "\n"; - stream << " dock = { shadow = false; fade = " << (fadeWindows?"true":"false") << "; no-fading-openclose = " << (fadeWindows?"false":"true") << "; };" << "\n"; + stream << " dock = { shadow = " << (shadowsOnDockWindows?"true":"false") << "; fade = " << (fadeWindows?"true":"false") << "; no-fading-openclose = " << (fadeWindows?"false":"true") << "; };" << "\n"; stream << "};" << "\n"; stream << "fade-in-step = " << (fadeInSpeed->value()/1000.0) << ";\n"; @@ -1778,7 +1790,7 @@ void KTranslucencyConfig::save( void ) stream << "greyscale-background = " << ((greyscaleBackground->isChecked() && useOpenGL->isChecked())?"true":"false") << ";\n"; // Global settings - stream << "no-dock-shadow = true;\n"; + stream << "no-dock-shadow = " << (shadows && shadowsOnDockWindows?"false":"true") << ";\n"; stream << "no-dnd-shadow = true;\n"; stream << "clear-shadow = true;\n"; stream << "shadow-ignore-shaped = false;\n"; @@ -1837,6 +1849,7 @@ void KTranslucencyConfig::defaults() useShadows->setChecked(FALSE); useShadowsOnMenuWindows->setChecked(TRUE); useShadowsOnToolTipWindows->setChecked(TRUE); + useShadowsOnDockWindows->setChecked(FALSE); removeShadowsOnMove->setChecked(FALSE); removeShadowsOnResize->setChecked(FALSE); shadowColor->setColor(Qt::black); diff --git a/twin/kcmtwin/twinoptions/windows.h b/twin/kcmtwin/twinoptions/windows.h index 52596ad1c..d4d358e9a 100644 --- a/twin/kcmtwin/twinoptions/windows.h +++ b/twin/kcmtwin/twinoptions/windows.h @@ -269,6 +269,7 @@ private: TQCheckBox *useShadows; TQCheckBox *useShadowsOnMenuWindows; TQCheckBox *useShadowsOnToolTipWindows; + TQCheckBox *useShadowsOnDockWindows; TQCheckBox *removeShadowsOnResize; TQCheckBox *removeShadowsOnMove; TQGroupBox *sGroup; |