mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-192210 Exclude users with Material UI theme from A/B experiment
IJPL-191979 Exclude users with enabled "Sync Theme with OS" from A/B experiment GitOrigin-RevId: 8ddc849030ad5ae2b7767431ff3dd7d9cc267832
This commit is contained in:
committed by
intellij-monorepo-bot
parent
868937821b
commit
4ad2b4cb9f
@@ -1,12 +1,14 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.ide.bootstrap
|
||||
|
||||
import com.intellij.ide.plugins.PluginManagerCore
|
||||
import com.intellij.ide.ui.LafManager
|
||||
import com.intellij.ide.ui.laf.UiThemeProviderListManager
|
||||
import com.intellij.ide.util.PropertiesComponent
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.Experiments
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.ui.JBColor
|
||||
import com.intellij.util.PlatformUtils
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
@@ -46,11 +48,20 @@ private fun enableTheme(oneIsland: Boolean) {
|
||||
val currentTheme = lafManager.currentUIThemeLookAndFeel?.id ?: return
|
||||
val currentEditorTheme = colorsManager.globalScheme.displayName
|
||||
|
||||
if (lafManager.autodetect) {
|
||||
return
|
||||
}
|
||||
|
||||
if ((currentTheme != "ExperimentalDark" && currentTheme != "ExperimentalLight" && currentTheme != "ExperimentalLightWithLightHeader") ||
|
||||
(currentEditorTheme != "Light" && currentEditorTheme != "Dark")) {
|
||||
return
|
||||
}
|
||||
|
||||
val id = PluginId.getId("com.chrisrm.idea.MaterialThemeUI")
|
||||
if (PluginManagerCore.findPlugin(id) != null && !PluginManagerCore.isDisabled(id)) {
|
||||
return
|
||||
}
|
||||
|
||||
val uiThemeManager = UiThemeProviderListManager.getInstance()
|
||||
val isLight = JBColor.isBright()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user