mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[collab] Always show focus border around rounded panel when focus is inside
GitOrigin-RevId: b2661d8f8f845c6ba79aefe19b7a6a322da3abd1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b808732dda
commit
119e5ffecd
@@ -24,6 +24,7 @@ import com.intellij.openapi.actionSystem.UiDataProvider
|
||||
import com.intellij.openapi.editor.colors.EditorColors
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager
|
||||
import com.intellij.openapi.ui.MessageDialogBuilder
|
||||
import com.intellij.openapi.wm.IdeFocusManager
|
||||
import com.intellij.ui.ColorUtil
|
||||
import com.intellij.ui.JBColor
|
||||
import com.intellij.ui.OverlaidOffsetIconsIcon
|
||||
@@ -42,14 +43,9 @@ import org.jetbrains.annotations.ApiStatus
|
||||
import java.awt.BorderLayout
|
||||
import java.awt.Color
|
||||
import java.awt.Insets
|
||||
import java.awt.event.ActionEvent
|
||||
import java.awt.event.ActionListener
|
||||
import java.awt.event.ComponentAdapter
|
||||
import java.awt.event.ComponentEvent
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.JLabel
|
||||
import javax.swing.JPanel
|
||||
import javax.swing.LayoutFocusTraversalPolicy
|
||||
import java.awt.KeyboardFocusManager
|
||||
import java.awt.event.*
|
||||
import javax.swing.*
|
||||
|
||||
object CodeReviewCommentUIUtil {
|
||||
|
||||
@@ -72,7 +68,8 @@ object CodeReviewCommentUIUtil {
|
||||
@ApiStatus.Internal
|
||||
fun createEditorInlayPanel(component: JComponent, tint: Color? = null): JPanel {
|
||||
val borderColor = JBColor.lazy {
|
||||
if (component.hasFocus()) return@lazy JBUI.CurrentTheme.Focus.focusColor()
|
||||
if (UIUtil.isFocusAncestor(component))
|
||||
return@lazy JBUI.CurrentTheme.Focus.focusColor()
|
||||
|
||||
val scheme = EditorColorsManager.getInstance().globalScheme
|
||||
scheme.getColor(EditorColors.TEARLINE_COLOR) ?: JBColor.border()
|
||||
|
||||
Reference in New Issue
Block a user