Skip to content

Commit

Permalink
feat(ui): adjust editor and panel border styles #157
Browse files Browse the repository at this point in the history
- Set editor background color for Markdown and plain text files.
- Reduce border radius for inline chat panel for a cleaner look.
  • Loading branch information
phodal committed Jan 1, 2025
1 parent b9fe811 commit ae76259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.testFramework.LightVirtualFile
import com.intellij.ui.JBColor
import com.intellij.ui.components.JBPanel
import com.intellij.util.concurrency.annotations.RequiresReadLock
import com.intellij.util.ui.JBUI
Expand Down Expand Up @@ -57,6 +58,8 @@ class CodeHighlightSketch(val project: Project, val text: String, private var id

if (ideaLanguage?.displayName != "Markdown" && ideaLanguage != PlainTextLanguage.INSTANCE) {
setupActionBar(project, editor)
} else {
editor.backgroundColor = JBColor.PanelBackground
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class ShireInlineChatPanel(val editor: Editor) : JPanel(GridBagLayout()), Editor
border = BorderFactory.createCompoundBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(12, 12, 12, 12),
RoundedLineBorder(JBColor.LIGHT_GRAY, 4, 1)
RoundedLineBorder(JBColor.LIGHT_GRAY, 1, 1)
),
BorderFactory.createCompoundBorder(
RoundedLineBorder(JBColor.LIGHT_GRAY, 4, 1),
RoundedLineBorder(JBColor.LIGHT_GRAY, 1, 1),
BorderFactory.createMatteBorder(10, 10, 10, 10, JBColor.PanelBackground)
)
)
Expand Down

0 comments on commit ae76259

Please sign in to comment.