From 5c6fd251821532adb6445240eb6bfba7b2be7c9f Mon Sep 17 00:00:00 2001 From: Irina Fediaeva Date: Fri, 17 Oct 2025 21:35:02 +0200 Subject: [PATCH] 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 --- .../platform/ide/bootstrap/Islands.kt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/Islands.kt b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/Islands.kt index 4ed8e5e29715..ef23cc80f653 100644 --- a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/Islands.kt +++ b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/Islands.kt @@ -29,6 +29,18 @@ suspend fun applyIslandsTheme(afterImportSettings: Boolean) { } val properties = serviceAsync() + + 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() + 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 } \ No newline at end of file