mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix search fields for darcula
(cherry picked from commit ddfc4f9c36d2fb81b3f2ca64a6d24eef37875b68)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -194,6 +194,15 @@ public class SearchTextField extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
super.paintComponent(g);
|
||||
if (UIUtil.isUnderDarcula()) {//todo[kb] fix DarculaTextBorder
|
||||
g.setColor(myTextField.getBackground());
|
||||
g.fillRect(2,3,getWidth(), getHeight()-5);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasNativeLeopardSearchControl() {
|
||||
return SystemInfo.isMacOSLeopard && UIUtil.isUnderAquaLookAndFeel();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -62,7 +62,9 @@ public abstract class SearchFieldAction extends AnAction implements CustomCompon
|
||||
Border border = myField.getBorder();
|
||||
Border emptyBorder = IdeBorderFactory.createEmptyBorder(3, 0, 2, 0);
|
||||
if (border instanceof CompoundBorder) {
|
||||
myField.setBorder(new CompoundBorder(emptyBorder, ((CompoundBorder)border).getInsideBorder()));
|
||||
if (!UIUtil.isUnderDarcula()) {
|
||||
myField.setBorder(new CompoundBorder(emptyBorder, ((CompoundBorder)border).getInsideBorder()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
myField.setBorder(emptyBorder);
|
||||
|
||||
Reference in New Issue
Block a user