diff --git a/platform/platform-impl/src/com/intellij/ide/ProjectWindowCustomizerService.kt b/platform/platform-impl/src/com/intellij/ide/ProjectWindowCustomizerService.kt index 72dacdcdba57..be6a75ab279d 100644 --- a/platform/platform-impl/src/com/intellij/ide/ProjectWindowCustomizerService.kt +++ b/platform/platform-impl/src/com/intellij/ide/ProjectWindowCustomizerService.kt @@ -12,6 +12,7 @@ import com.intellij.openapi.project.ProjectManager import com.intellij.openapi.project.ex.ProjectManagerEx import com.intellij.openapi.startup.ProjectActivity import com.intellij.openapi.util.Disposer +import com.intellij.openapi.util.registry.Registry import com.intellij.openapi.wm.ex.WindowManagerEx import com.intellij.openapi.wm.impl.ProjectFrameHelper import com.intellij.ui.GotItTooltip @@ -50,7 +51,7 @@ class ProjectWindowCustomizerService : Disposable { internal fun update(newValue: Boolean) { if (newValue != ourSettingsValue) { ourSettingsValue = newValue - wasGradientPainted = newValue && ProjectManager.getInstance().openProjects.size > 1 + wasGradientPainted = newValue && conditionToEnable() fireUpdate() } } @@ -71,12 +72,14 @@ class ProjectWindowCustomizerService : Disposable { } fun enableIfNeeded() { - if (ProjectManagerEx.getOpenProjects().size > 1 && !wasGradientPainted) { + if (conditionToEnable() && !wasGradientPainted) { wasGradientPainted = true fireUpdate() } } + private fun conditionToEnable() = ProjectManagerEx.getOpenProjects().size > 1 || Registry.`is`("ide.colorful.toolbar.force") + fun addListener(disposable: Disposable, fireFirstTime: Boolean, listener: (Boolean) -> Unit) { if (fireFirstTime) { listener(isActive()) @@ -92,6 +95,7 @@ class ProjectWindowCustomizerService : Disposable { } fun shouldShowGotIt() = !gotItShown + private fun recordGotItShown() { gotItShown = true } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index dc46ca7c8bbd..f140d17286e5 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -2337,5 +2337,9 @@ ide.speed.search.allow.custom.location.description=Allow using SpeedSearchSupply ide.log.coroutine.pce=true ide.log.coroutine.pce.description=Log PCEs occurring in coroutines. \ These exceptions are treated as failure by coroutine framework, and should be reported as such. + +ide.colorful.toolbar.force=false +ide.colorful.toolbar.force.description=Show 'Colorful toolbar' even if there is one project open (works only if the feature is enabled). \ + Reopen project or restart IDE to apply the setting # please leave this note as last line # TODO please use EP com.intellij.registryKey for plugin/product specific keys