Source:
<code>public SpellingPreferencesPane(GlobalDisplay globalDisplay, PreferencesDialogResources res, SpellingService spellingService, UserPrefs prefs) { globalDisplay_ = globalDisplay; res_ = res; spellingService_ = spellingService; uiPrefs_ = prefs; languageWidget_ = new SpellingLanguageSelectWidget(onInstallLanguages_); spaced(languageWidget_); add(languageWidget_); customDictsWidget_ = new SpellingCustomDictionariesWidget(); spaced(customDictsWidget_); nudgeRight(customDictsWidget_); add(customDictsWidget_); add(checkboxPref("Ignore words in UPPERCASE", prefs.ignoreUppercaseWords())); add(checkboxPref("Ignore words with numbers", prefs.ignoreWordsWithNumbers())); boolean canRealtime = TypoSpellChecker.canRealtimeSpellcheckDict(prefs.spellingDictionaryLanguage().getValue()); realtimeSpellcheckingCheckbox_ = checkboxPref("Use real time spellchecking", prefs.realTimeSpellchecking()); realtimeSpellcheckingCheckbox_.getElement().getStyle().setColor(canRealtime ? "black" : "darkgrey"); add(realtimeSpellcheckingCheckbox_); blacklistWarning_ = new Label("Real time spellchecking currently unavailable for this dictionary"); blacklistWarning_.getElement().getStyle().setColor("red"); blacklistWarning_.setVisible(!canRealtime); add(blacklistWarning_); languageWidget_.addChangeHandler((event) -> { boolean canRealtimeCheck = TypoSpellChecker.canRealtimeSpellcheckDict(languageWidget_.getSelectedLanguage()); blacklistWarning_.setVisible(!canRealtimeCheck); realtimeSpellcheckingCheckbox_.setValue(realtimeSpellcheckingCheckbox_.getValue() && canRealtimeCheck); realtimeSpellcheckingCheckbox_.setEnabled(canRealtimeCheck); <START> realtimeSpellcheckingCheckbox_.getElement().getStyle().setColor(canRealtimeCheck ? "black" : "darkgrey"); <END> }); }</code><technical_language>a number of RStudio themes in wild attempt dark-theme dialogs. This is technically supported this break them. do opacity instead</technical_language>

Target:
public SpellingPreferencesPane(GlobalDisplay globalDisplay, PreferencesDialogResources res, SpellingService spellingService, UserPrefs prefs) { globalDisplay_ = globalDisplay; res_ = res; spellingService_ = spellingService; uiPrefs_ = prefs; languageWidget_ = new SpellingLanguageSelectWidget(onInstallLanguages_); spaced(languageWidget_); add(languageWidget_); customDictsWidget_ = new SpellingCustomDictionariesWidget(); spaced(customDictsWidget_); nudgeRight(customDictsWidget_); add(customDictsWidget_); add(checkboxPref("Ignore words in UPPERCASE", prefs.ignoreUppercaseWords())); add(checkboxPref("Ignore words with numbers", prefs.ignoreWordsWithNumbers())); boolean canRealtime = TypoSpellChecker.canRealtimeSpellcheckDict(prefs.spellingDictionaryLanguage().getValue()); realtimeSpellcheckingCheckbox_ = checkboxPref("Use real time spellchecking", prefs.realTimeSpellchecking()); realtimeSpellcheckingCheckbox_.getElement().getStyle().setOpacity(canRealtime ? 1.0 : 0.6); add(realtimeSpellcheckingCheckbox_); blacklistWarning_ = new Label("Real time spellchecking currently unavailable for this dictionary"); blacklistWarning_.getElement().getStyle().setColor("red"); blacklistWarning_.setVisible(!canRealtime); add(blacklistWarning_); languageWidget_.addChangeHandler((event) -> { boolean canRealtimeCheck = TypoSpellChecker.canRealtimeSpellcheckDict(languageWidget_.getSelectedLanguage()); blacklistWarning_.setVisible(!canRealtimeCheck); realtimeSpellcheckingCheckbox_.setValue(realtimeSpellcheckingCheckbox_.getValue() && canRealtimeCheck); realtimeSpellcheckingCheckbox_.setEnabled(canRealtimeCheck); realtimeSpellcheckingCheckbox_.getElement().getStyle().setOpacity(canRealtimeCheck ? 1.0 : 0.6); }); }