RIDER-131154: Force update color scheme for Islands Dark to the new "Rider Islands Dark"

The previous default was "Rider Dark", and after the color scheme change we should force this update because IDE saves the last used scheme, which was "Rider Dark"


(cherry picked from commit 6be187ecfc209fa37ad9fd277d272bfcd30a56eb)

IJ-CR-179045

GitOrigin-RevId: 176fce1d008aa49dea32deb680c5aabfe6133d89
This commit is contained in:
Irina Fediaeva
2025-10-20 20:50:17 +00:00
committed by intellij-monorepo-bot
parent ea39ed6ad9
commit 5c6fd25182
@@ -29,6 +29,18 @@ suspend fun applyIslandsTheme(afterImportSettings: Boolean) {
}
val properties = serviceAsync<PropertiesComponent>()
if (PlatformUtils.isRider() && !properties.getBoolean("rider.color.scheme.updated", false)) {
properties.setValue("rider.color.scheme.updated", true)
val finish = withContext(Dispatchers.EDT) {
changeColorSchemeForRiderIslandsDarkTheme()
}
if (finish) {
return
}
}
if (afterImportSettings) {
if (properties.getValue("ide.islands.show.feedback2") != "show.promo") {
return
@@ -90,4 +102,20 @@ private suspend fun enableTheme() {
newTheme.installEditorScheme(colorsManager.getScheme(editorScheme) ?: colorsManager.defaultScheme)
lafManager.updateUI()
}
private suspend fun changeColorSchemeForRiderIslandsDarkTheme(): Boolean {
val colorsManager = EditorColorsManager.getInstance()
val lafManager = serviceAsync<LafManager>()
val currentLaf = lafManager.currentUIThemeLookAndFeel ?: return false
if (currentLaf.id != "Islands Dark" || colorsManager.globalScheme.displayName != "Rider Dark") {
return false
}
currentLaf.installEditorScheme(colorsManager.getScheme("Rider Islands Dark") ?: return false)
lafManager.updateUI()
return true
}