IJPL-149894 Darcula editor color scheme is enabled for Dark UI theme when the settings are imported from another JB IDE where the Classic UI was enabled

GitOrigin-RevId: 69be19f658deb41bb7e6114096adc417c60b27c0
This commit is contained in:
Alexander Lobas
2024-05-17 16:06:38 +02:00
committed by intellij-monorepo-bot
parent 95e97bc93c
commit 3835edc3ec
3 changed files with 3 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ private class ExperimentalUIImpl : ExperimentalUI() {
}
else if (!prevNewUi && newUi) {
isResetLaf.set(true)
wasThemeReset = true
enabled = true
setNewUiUsed()

View File

@@ -34,6 +34,7 @@ abstract class ExperimentalUI {
// Should be unset by the client, or it will be unset on the IDE close.
const val NEW_UI_SWITCH: String = "experimental.ui.switch"
var forcedSwitchedUi: Boolean = false
var wasThemeReset = false
@Internal
val EP_LISTENER: ExtensionPointName<Listener> = ExtensionPointName("com.intellij.uiChangeListener")

View File

@@ -83,7 +83,7 @@ class JbSettingsImporter(private val configDirPath: Path,
KeymapManager.getInstance()
componentStore.reloadState(KeymapManagerImpl::class.java)
}
if (categories.contains(SettingsCategory.UI)) {
if (categories.contains(SettingsCategory.UI) && !ExperimentalUI.wasThemeReset) {
// ensure component is loaded
LafManager.getInstance()
EditorColorsManager.getInstance()