IDEA-142359 Find/Replace: move checkboxes back

Stage #3
This commit is contained in:
Vassiliy.Kudryashov
2015-07-16 22:09:02 +03:00
parent 6e5025725b
commit 992c5ac31e
2 changed files with 6 additions and 2 deletions
@@ -16,6 +16,7 @@
package com.intellij.ide.ui.laf.darcula.ui;
import com.intellij.ide.ui.laf.darcula.DarculaUIUtil;
import com.intellij.openapi.actionSystem.ActionToolbar;
import com.intellij.openapi.ui.GraphicsConfig;
import com.intellij.ui.Gray;
import com.intellij.util.ui.JBUI;
@@ -71,6 +72,9 @@ public class DarculaButtonPainter implements Border, UIResource {
@Override
public Insets getBorderInsets(Component c) {
if (c.getParent() instanceof ActionToolbar) {
return JBUI.insets(4, 16, 4, 16);
}
if (DarculaButtonUI.isSquare(c)) {
return JBUI.insets(2, 0, 2, 0).asUIResource();
}
@@ -349,7 +349,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
customComponent = ((CustomComponentAction)action).createCustomComponent(presentation);
presentation.putClientProperty(CustomComponentAction.CUSTOM_COMPONENT_PROPERTY, customComponent);
}
if (customComponent instanceof JCheckBox && UIUtil.isUnderWindowsLookAndFeel()) {
if (customComponent instanceof JCheckBox) {
customComponent.setBorder(JBUI.Borders.empty(0, 9, 0, 0));
}
tweakActionComponentUI(customComponent);
@@ -517,7 +517,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
if (myOrientation == SwingConstants.HORIZONTAL) {
int eachX = insets.left;
int eachY = insets.top;
int maxHeight = 0;
int maxHeight = sizeToFit.height;
for (int i = 0; i < componentCount; i++) {
final Component eachComp = getComponent(i);
final boolean isLast = i == componentCount - 1;