diff --git a/notebooks/notebook-ui/src/com/intellij/notebooks/ui/visualization/NotebookEditorAppearance.kt b/notebooks/notebook-ui/src/com/intellij/notebooks/ui/visualization/NotebookEditorAppearance.kt index 0ff281242134..e528aa3e5c32 100644 --- a/notebooks/notebook-ui/src/com/intellij/notebooks/ui/visualization/NotebookEditorAppearance.kt +++ b/notebooks/notebook-ui/src/com/intellij/notebooks/ui/visualization/NotebookEditorAppearance.kt @@ -3,8 +3,10 @@ package com.intellij.notebooks.ui.visualization import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.colors.ColorKey +import com.intellij.openapi.editor.colors.EditorColorsManager import com.intellij.openapi.editor.colors.EditorColorsScheme import com.intellij.openapi.editor.impl.EditorImpl +import com.intellij.openapi.observable.properties.ObservableProperty import com.intellij.openapi.util.Key import com.intellij.ui.JBColor import com.intellij.ui.NewUiValue @@ -72,6 +74,16 @@ interface NotebookEditorAppearanceSizes { interface NotebookEditorAppearanceColors { // TODO Sort everything lexicographically. + // it is a temporary hack to avoid PY-78524 (will be removed in future) + val codeCellBackgroundColor: ObservableProperty + get() { + return object : ObservableProperty { + override fun get(): Color { + return getCodeCellBackground(EditorColorsManager.getInstance().globalScheme) ?: JBColor.BLACK + } + } + } + fun getCodeCellBackground(scheme: EditorColorsScheme): Color? = scheme.defaultBackground fun getGutterInputExecutionCountForegroundColor(scheme: EditorColorsScheme): Color? = null fun getGutterOutputExecutionCountForegroundColor(scheme: EditorColorsScheme): Color? = null