mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
refactor [collab]: prioritize the full name in chooser popup
GitOrigin-RevId: 7a35fc1aa6f04a9fc941f439c862a2d37c155966
This commit is contained in:
committed by
intellij-monorepo-bot
parent
12151a13f7
commit
e98a86b400
+4
-2
@@ -25,11 +25,13 @@ class SimplePopupItemRenderer<T> private constructor(private val presenter: (T)
|
||||
override fun customizeCellRenderer(list: JList<out T>, value: T, index: Int, selected: Boolean, hasFocus: Boolean) {
|
||||
val presentation = presenter(value)
|
||||
icon = presentation.icon
|
||||
append(presentation.shortText)
|
||||
val fullText = presentation.fullText
|
||||
if (fullText != null) {
|
||||
append(fullText)
|
||||
append(" ")
|
||||
append(fullText, SimpleTextAttributes.GRAYED_ATTRIBUTES)
|
||||
append(presentation.shortText, SimpleTextAttributes.GRAYED_ATTRIBUTES)
|
||||
} else {
|
||||
append(presentation.shortText)
|
||||
}
|
||||
|
||||
// ColoredListCellRenderer sets null for a background in case of !selected, so it can't work with SelectablePanel
|
||||
|
||||
Reference in New Issue
Block a user