mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
text is not centered under Darcula and IntelliJ laf
This commit is contained in:
@@ -35,6 +35,7 @@ import com.intellij.util.ui.MacUIUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -267,6 +268,12 @@ public class EditorComboBox extends JComboBox implements DocumentListener {
|
||||
setEditor();
|
||||
|
||||
super.addNotify();
|
||||
if (UIUtil.isUnderDarcula() || UIUtil.isUnderIntelliJLaF()) {
|
||||
final JScrollPane scrollPane = UIUtil.findComponentOfType(myEditorField, JScrollPane.class);
|
||||
if (scrollPane != null) {
|
||||
scrollPane.setBorder(new EmptyBorder(1,0,1,0));
|
||||
}
|
||||
}
|
||||
myEditorField.getFocusTarget().addFocusListener(new FocusAdapter() {
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user