freeing hidden feature to apply translucency only on window parts (title/content)

BUGS:99121
changed "Translucency" tab to "Opacity"

svn path=/trunk/kdebase/kwin/; revision=393628
This commit is contained in:
Thomas Lübking 2005-02-27 20:44:44 +00:00
parent 28d89857a1
commit 36eb2d4f13

View file

@ -1198,16 +1198,17 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
QVBoxLayout *vLay = new QVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint()); QVBoxLayout *vLay = new QVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
vLay->addSpacing(11); // to get the proper gb top offset vLay->addSpacing(11); // to get the proper gb top offset
// QHBoxLayout *hLay = new QHBoxLayout(vLay); QHBoxLayout *hLay = new QHBoxLayout(vLay);
// QLabel *label0 = new QLabel(i18n("Apply translucency on"),tGroup); QLabel *label0 = new QLabel(i18n("Apply translucency on"),tGroup);
// hLay->addWidget(label0); hLay->addWidget(label0);
// transMode = new QComboBox(tGroup); transMode = new QComboBox(tGroup);
// transMode->insertItem ("i18n(The whole window)"); transMode->insertItem (i18n("The whole window"));
// transMode->insertItem ("i18n(The titlebar only)"); transMode->insertItem (i18n("The titlebar only"));
// transMode->insertItem ("i18n(The content only)"); transMode->insertItem (i18n("The content only"));
// hLay->addWidget(transMode); hLay->addWidget(transMode);
hLay->addStretch();
// vLay->addSpacing(11); vLay->addSpacing(11);
QGridLayout *gLay = new QGridLayout(vLay,4,2,KDialog::spacingHint()); QGridLayout *gLay = new QGridLayout(vLay,4,2,KDialog::spacingHint());
gLay->setColStretch(1,1); gLay->setColStretch(1,1);
@ -1249,7 +1250,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
vLay->addWidget(disableARGB); vLay->addWidget(disableARGB);
vLay->addStretch(); vLay->addStretch();
tabW->addTab(tGroup, i18n("Translucency")); tabW->addTab(tGroup, i18n("Opacity"));
QWidget *sGroup = new QWidget(tabW); QWidget *sGroup = new QWidget(tabW);
// sGroup->setCheckable(TRUE); // sGroup->setCheckable(TRUE);
@ -1342,7 +1343,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
connect(dockWindowTransparency, SIGNAL(toggled(bool)), dockWindowOpacity, SLOT(setEnabled(bool))); connect(dockWindowTransparency, SIGNAL(toggled(bool)), dockWindowOpacity, SLOT(setEnabled(bool)));
connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(changed())); connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(changed()));
// connect(transMode, SIGNAL(activated(int)), SLOT(changed())); connect(transMode, SIGNAL(activated(int)), SLOT(changed()));
connect(activeWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed())); connect(activeWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed())); connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
connect(movingWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed())); connect(movingWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
@ -1383,7 +1384,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
// handle kompmgr restarts if necessary // handle kompmgr restarts if necessary
connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(resetKompmgr())); connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
// connect(transMode, SIGNAL(activated(int)), SLOT(resetKompmgr())); connect(transMode, SIGNAL(activated(int)), SLOT(resetKompmgr()));
connect(disableARGB, SIGNAL(toggled(bool)), SLOT(resetKompmgr())); connect(disableARGB, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
connect(useShadows, SIGNAL(toggled(bool)), SLOT(resetKompmgr())); connect(useShadows, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(resetKompmgr())); connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
@ -1437,8 +1438,8 @@ void KTranslucencyConfig::load( void )
KConfig conf_(QDir::homeDirPath() + "/.xcompmgrrc"); KConfig conf_(QDir::homeDirPath() + "/.xcompmgrrc");
conf_.setGroup("xcompmgr"); conf_.setGroup("xcompmgr");
// QString modeString = conf_.readEntry("TransMode","All"); QString modeString = conf_.readEntry("TransMode","All");
// transMode->setCurrentItem(!modeString.compare("Content")?2:!modeString.compare("Title")?1:0); transMode->setCurrentItem(!modeString.compare("Content")?2:!modeString.compare("Title")?1:0);
disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE)); disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
@ -1504,7 +1505,7 @@ void KTranslucencyConfig::save( void )
conf_->writeEntry("DisableARGB",disableARGB->isChecked()); conf_->writeEntry("DisableARGB",disableARGB->isChecked());
conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value()); conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value());
conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value()); conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value());
// conf_->writeEntry("TransMode",transMode->currentItem()==0?"All":transMode->currentItem()==1?"Title":"Content"); conf_->writeEntry("TransMode",transMode->currentItem()==0?"All":transMode->currentItem()==1?"Title":"Content");
int r, g, b; int r, g, b;
@ -1535,7 +1536,7 @@ void KTranslucencyConfig::defaults()
if (!kompmgrAvailable_) if (!kompmgrAvailable_)
return; return;
useTranslucency->setChecked(false); useTranslucency->setChecked(false);
// transMode->setCurrentItem(0); transMode->setCurrentItem(0);
activeWindowTransparency->setChecked(false); activeWindowTransparency->setChecked(false);
inactiveWindowTransparency->setChecked(true); inactiveWindowTransparency->setChecked(true);
movingWindowTransparency->setChecked(false); movingWindowTransparency->setChecked(false);