module ant: dpi-aware insets

This commit is contained in:
Konstantin Bulenkov
2016-05-07 22:26:14 +02:00
parent b370c2824c
commit bdce8bdfb1
2 changed files with 9 additions and 8 deletions

View File

@@ -99,17 +99,17 @@ public class SaveMetaTargetDialog extends DialogWrapper {
panel.add(new JLabel(AntBundle.message("save.meta.data.targets.label")), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1,
0.0, 0.0, GridBagConstraints.NORTHWEST,
GridBagConstraints.NONE,
new Insets(6, 0, 0, 0), 0, 0));
JBUI.insetsTop(6), 0, 0));
panel.add(ScrollPaneFactory.createScrollPane(myTargetList), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 2, 1.0, 1.0,
GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
new Insets(4, 0, 0, 0), 0, 0));
GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
JBUI.insetsTop(4), 0, 0));
final JButton upButton = new JButton(AntBundle.message("button.move.up"));
panel.add(upButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
new Insets(6, 6, 0, 0), 0, 0));
JBUI.insets(6, 6, 0, 0), 0, 0));
final JButton downButton = new JButton(AntBundle.message("button.move.down"));
panel.add(downButton, new GridBagConstraints(1, 4, 1, GridBagConstraints.REMAINDER, 0.0, 1.0, GridBagConstraints.NORTHWEST,
GridBagConstraints.HORIZONTAL, new Insets(0, 6, 0, 0), 0, 0));
GridBagConstraints.HORIZONTAL, JBUI.insetsLeft(6), 0, 0));
class UpdateAction implements ActionListener {
public void actionPerformed(ActionEvent e) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -31,6 +31,7 @@ import com.intellij.psi.xml.XmlFile;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.util.PathUtil;
import com.intellij.util.indexing.FileBasedIndex;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NonNls;
import javax.swing.*;
@@ -76,11 +77,11 @@ public class AntHectorConfigurable extends HectorComponentPanel {
myCombo.putClientProperty(CONTEXTS_COMBO_KEY, Boolean.TRUE);
panel.add(
new JLabel("Included into:"),
new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)
new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.insets(5, 0), 0, 0)
);
panel.add(
myCombo,
new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0));
new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insets(5, 5, 5, 0), 0, 0));
final PsiManager psiManager = PsiManager.getInstance(myProject);
final FileBasedIndex fbi = FileBasedIndex.getInstance();