mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show a dotted border around the first autopopup item instead of preview
preview is distracting, doesn't show the full text to be inserted and there seems to be no way of showing it together with the typed prefix
This commit is contained in:
@@ -85,6 +85,10 @@ public class CompletionPreview implements Disposable {
|
||||
}
|
||||
|
||||
private void updatePreview() {
|
||||
if (true) {
|
||||
return;
|
||||
}
|
||||
|
||||
LookupElement item = myLookup.getCurrentItem();
|
||||
if (item == null) {
|
||||
return;
|
||||
|
||||
@@ -118,10 +118,14 @@ public class LookupCellRenderer implements ListCellRenderer {
|
||||
boolean hasFocus) {
|
||||
|
||||
|
||||
boolean paintBorder = false;
|
||||
if (!myLookup.isFocused()) {
|
||||
paintBorder = isSelected && CompletionPreview.hasPreview(myLookup);
|
||||
isSelected = false;
|
||||
}
|
||||
|
||||
myPanel.setBorder(paintBorder ? new DottedBorder(SELECTED_BACKGROUND_COLOR) : null);
|
||||
|
||||
myIsSelected = isSelected;
|
||||
final LookupElement item = (LookupElement)value;
|
||||
final Color foreground = getForegroundColor(isSelected);
|
||||
@@ -397,13 +401,10 @@ public class LookupCellRenderer implements ListCellRenderer {
|
||||
|
||||
@Override
|
||||
public void paint(Graphics g){
|
||||
if (!myLookup.isFocused() && myLookup.isCompletion()) {
|
||||
if (!myLookup.isFocused() && myLookup.isCompletion() && !CompletionPreview.hasPreview(myLookup)) {
|
||||
((Graphics2D)g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f));
|
||||
}
|
||||
super.paint(g);
|
||||
//if (myUpdateExtender) {
|
||||
// myLookup.updateExtender();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user