mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-107350 EvaluateXPath dialog: input field height is too small, text is unreadable
This commit is contained in:
+12
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.plaf.InsetsUIResource;
|
||||
import java.awt.*;
|
||||
@@ -31,6 +32,9 @@ import java.awt.*;
|
||||
public class DarculaEditorTextFieldBorder implements Border {
|
||||
@Override
|
||||
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
|
||||
if (isComboBoxEditor(c)) {
|
||||
return;
|
||||
}
|
||||
final EditorTextField textField = UIUtil.getParentOfType(EditorTextField.class, c);
|
||||
if (textField == null) return;
|
||||
|
||||
@@ -61,6 +65,9 @@ public class DarculaEditorTextFieldBorder implements Border {
|
||||
|
||||
@Override
|
||||
public Insets getBorderInsets(Component c) {
|
||||
if (isComboBoxEditor(c)) {
|
||||
return new InsetsUIResource(1,1,1,1);
|
||||
}
|
||||
return new InsetsUIResource(6, 7, 6, 7);
|
||||
}
|
||||
|
||||
@@ -68,4 +75,8 @@ public class DarculaEditorTextFieldBorder implements Border {
|
||||
public boolean isBorderOpaque() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isComboBoxEditor(Component c) {
|
||||
return UIUtil.getParentOfType(JComboBox.class, c) != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user