Skip to content

Commit af41812

Browse files
committed
fix(devti): improve UI display for markdown and plain text files
- Set background color to JBColor.PanelBackground for markdown and plain text files - Remove border around editor for better visual consistency
1 parent 961f3d1 commit af41812

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/CodeHighlightSketch.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import com.intellij.openapi.util.text.StringUtil
3535
import com.intellij.openapi.vfs.VirtualFile
3636
import com.intellij.psi.PsiManager
3737
import com.intellij.testFramework.LightVirtualFile
38+
import com.intellij.ui.JBColor
3839
import com.intellij.ui.components.JBPanel
3940
import com.intellij.ui.components.panels.VerticalLayout
4041
import com.intellij.util.concurrency.annotations.RequiresReadLock
@@ -100,6 +101,9 @@ open class CodeHighlightSketch(
100101
val isDeclarePackageFile = BuildSystemProvider.isDeclarePackageFile(fileName)
101102
if (textLanguage != null && textLanguage?.lowercase() != "markdown" && ideaLanguage != PlainTextLanguage.INSTANCE) {
102103
setupActionBar(project, editor, isDeclarePackageFile)
104+
} else{
105+
editorFragment?.editor?.backgroundColor = JBColor.PanelBackground
106+
editorFragment?.editor?.setBorder(JBEmptyBorder(0, 0, 0, 0))
103107
}
104108
}
105109

0 commit comments

Comments
 (0)