mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-171869 Win10 LaF JSpinner fixed
This commit is contained in:
+3
-1
@@ -32,6 +32,7 @@ import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.ui.JBDimension;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -122,7 +123,8 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
|
||||
myInfoComponent = createInfoComponent();
|
||||
controlsPanel.add(myInfoComponent);
|
||||
controlsPanel.add(Box.createHorizontalGlue());
|
||||
int height = Math.max(mySchemesCombo.getComponent().getPreferredSize().height, myToolbar.getPreferredSize().height) + 2;
|
||||
int height = Math.max(mySchemesCombo.getComponent().getPreferredSize().height, myToolbar.getPreferredSize().height);
|
||||
height += UIUtil.isUnderWin10LookAndFeel() ? 0 : 2;
|
||||
controlsPanel.setPreferredSize(new Dimension(controlsPanel.getMinimumSize().width, height));
|
||||
controlsPanel.setMaximumSize(new Dimension(controlsPanel.getMaximumSize().width, height));
|
||||
return controlsPanel;
|
||||
|
||||
+5
-4
@@ -92,12 +92,13 @@ public class WinIntelliJTextFieldUI extends DarculaTextFieldUI {
|
||||
}
|
||||
|
||||
Rectangle r = new Rectangle(c.getSize());
|
||||
JBInsets.removeFrom(r, JBUI.insets(2));
|
||||
if (UIUtil.getParentOfType(JSpinner.class, c) == null) { // Fill whole rectangle in spinner
|
||||
JBInsets.removeFrom(r, JBUI.insets(2));
|
||||
|
||||
if (UIUtil.getParentOfType(Wrapper.class, c) != null && isSearchFieldWithHistoryPopup(c)) {
|
||||
JBInsets.removeFrom(r, JBUI.insets(2, 0));
|
||||
if (UIUtil.getParentOfType(Wrapper.class, c) != null && isSearchFieldWithHistoryPopup(c)) {
|
||||
JBInsets.removeFrom(r, JBUI.insets(2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
g2.fill(r);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1299,8 +1299,8 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar, QuickAct
|
||||
setBorder(JBUI.Borders.empty());
|
||||
setOpaque(false);
|
||||
} else {
|
||||
setBorder(UIUtil.isUnderWin10LookAndFeel() ? JBUI.Borders.empty() : JBUI.Borders.empty(2));
|
||||
setMinimumButtonSize(myDecorateButtons ? new Dimension(30, 20) : DEFAULT_MINIMUM_BUTTON_SIZE);
|
||||
setBorder(JBUI.Borders.empty(2));
|
||||
setMinimumButtonSize(myDecorateButtons ? JBUI.size(30, 20) : DEFAULT_MINIMUM_BUTTON_SIZE);
|
||||
setOpaque(true);
|
||||
setLayoutPolicy(AUTO_LAYOUT_POLICY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user