mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
+4
@@ -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();
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user