Port to MigLayout 5.0

This commit is contained in:
Reinhard Pointner 2016-10-17 03:11:02 +08:00
parent 32a1d60e7b
commit 42305c0df6
3 changed files with 10 additions and 10 deletions

View File

@ -115,9 +115,9 @@ class HistoryDialog extends JDialog {
header.setBorder(new SeparatorBorder(1, new Color(0xB4B4B4), new Color(0xACACAC), GradientStyle.LEFT_TO_RIGHT, Position.BOTTOM));
header.add(title, "wrap");
header.add(infoLabel, "gap indent*2, wrap paragraph:push");
header.add(infoLabel, "gap indent*2, wrap");
JPanel content = new JPanel(new MigLayout("fill, insets dialog, nogrid", "", "[pref!][150px:pref:200px][200px:pref:max, grow][pref!]"));
JPanel content = new JPanel(new MigLayout("fill, insets dialog, nogrid, novisualpadding", "", "[pref!][150px:pref:200px][200px:pref:max, grow][pref!]"));
content.add(new JLabel("Filter:"), "gap indent:push");
content.add(filterEditor, "wmin 120px, gap rel");
@ -136,7 +136,7 @@ class HistoryDialog extends JDialog {
JComponent pane = (JComponent) getContentPane();
pane.setLayout(new MigLayout("fill, insets 0, nogrid"));
pane.add(header, "hmin 60px, growx, dock north");
pane.add(header, "h min!, growx, dock north");
pane.add(content, "grow");
// initialize selection modes

View File

@ -120,7 +120,7 @@ class SubtitleDownloadComponent extends JComponent {
JButton clearButton = createImageButton(clearFilterAction);
clearButton.setOpaque(false);
setLayout(new MigLayout("nogrid, fill", "[fill]", "[pref!][fill]"));
setLayout(new MigLayout("nogrid, fill, novisualpadding", "[fill]", "[pref!][fill]"));
add(new JLabel("Filter:"), "gap indent:push");
add(filterEditor, "wmin 120px, gap rel");

View File

@ -69,15 +69,15 @@ public class SubtitleViewer extends JFrame {
titleLabel.setText(title);
titleLabel.setFont(titleLabel.getFont().deriveFont(BOLD));
JPanel header = new JPanel(new MigLayout("insets dialog, nogrid, fillx"));
JPanel header = new JPanel(new MigLayout("insets dialog, nogrid, novisualpadding, fillx"));
header.setBackground(Color.white);
header.setBorder(new SeparatorBorder(1, new Color(0xB4B4B4), new Color(0xACACAC), GradientStyle.LEFT_TO_RIGHT, Position.BOTTOM));
header.add(titleLabel, "wrap");
header.add(infoLabel, "gap indent*2, wrap paragraph:push");
header.add(titleLabel, "wrap, h pref!");
header.add(infoLabel, "gap indent*2, h pref!, wrap");
JPanel content = new JPanel(new MigLayout("fill, insets dialog, nogrid", "[fill]", "[pref!][fill]"));
JPanel content = new JPanel(new MigLayout("fill, insets dialog, nogrid, novisualpadding", "[fill]", "[pref!][fill]"));
content.add(new JLabel("Filter:"), "gap indent:push");
content.add(filterEditor, "wmin 120px, gap rel");
@ -85,9 +85,9 @@ public class SubtitleViewer extends JFrame {
content.add(new JScrollPane(subtitleTable), "grow");
JComponent pane = (JComponent) getContentPane();
pane.setLayout(new MigLayout("fill, insets 0 0 rel 0"));
pane.setLayout(new MigLayout("fill, novisualpadding, insets 0 0 rel 0"));
pane.add(header, "hmin 20px, growx, dock north");
pane.add(header, "h min!, growx, dock north");
pane.add(content, "grow");
// initialize window properties