diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index c8693da8ae..6161f42643 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -166,7 +166,7 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList connect(ui.animationSpeedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(toogleSmoothScaleUi(int))); + connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(alignGuiToCompositingType(int))); connect(ui.compositingType, SIGNAL(activated(int)), this, SLOT(suggestGraphicsSystem())); connect(ui.graphicsSystem, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(ui.windowThumbnails, SIGNAL(activated(int)), this, SLOT(changed())); @@ -376,12 +376,16 @@ void KWinCompositingConfig::suggestGraphicsSystem() ui.graphicsSystem->setCurrentIndex(0); } -void KWinCompositingConfig::toogleSmoothScaleUi(int compositingType) +void KWinCompositingConfig::alignGuiToCompositingType(int compositingType) { ui.glScaleFilter->setVisible(compositingType != XRENDER_INDEX); ui.xrScaleFilter->setVisible(compositingType == XRENDER_INDEX); ui.scaleMethodLabel->setBuddy(compositingType == XRENDER_INDEX ? ui.xrScaleFilter : ui.glScaleFilter); + ui.glGroup->setEnabled(compositingType != XRENDER_INDEX); + + ui.glColorCorrection->setEnabled(compositingType == OPENGL20_INDEX || + compositingType == OPENGL31_INDEX); } void KWinCompositingConfig::toggleEffectShortcutChanged(const QKeySequence &seq) @@ -451,7 +455,7 @@ void KWinCompositingConfig::loadAdvancedTab() ui.glSwapStrategy->setCurrentIndex(swapStrategy); ui.glColorCorrection->setChecked(config.readEntry("GLColorCorrection", false)); - toogleSmoothScaleUi(ui.compositingType->currentIndex()); + alignGuiToCompositingType(ui.compositingType->currentIndex()); } void KWinCompositingConfig::updateStatusUI(bool compositingIsPossible) diff --git a/kcmkwin/kwincompositing/main.h b/kcmkwin/kwincompositing/main.h index 20592b4030..496c445073 100644 --- a/kcmkwin/kwincompositing/main.h +++ b/kcmkwin/kwincompositing/main.h @@ -81,7 +81,7 @@ private slots: void glSwapStrategyChanged(int idx); void rearmGlSupport(); void suggestGraphicsSystem(); - void toogleSmoothScaleUi(int compositingType); + void alignGuiToCompositingType(int compositingType); void toggleEffectShortcutChanged(const QKeySequence &seq); void updateStatusUI(bool compositingIsPossible); void showDetailedEffectLoadingInformation();