From c4a582ff9b6ae7e9c1fdb42a9a72c1b36b63a480 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 25 May 2015 09:23:24 +0000 Subject: [PATCH] * fix image button size issues --- source/net/filebot/ui/rename/FormatDialog.java | 4 ++-- source/net/filebot/ui/rename/RenameList.java | 9 +++++---- source/net/filebot/ui/subtitle/SubtitlePanel.java | 2 +- source/net/filebot/util/ui/SwingUI.java | 10 ++++++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/source/net/filebot/ui/rename/FormatDialog.java b/source/net/filebot/ui/rename/FormatDialog.java index b3741e08..94cd8f59 100644 --- a/source/net/filebot/ui/rename/FormatDialog.java +++ b/source/net/filebot/ui/rename/FormatDialog.java @@ -205,7 +205,7 @@ public class FormatDialog extends JDialog { content.add(help, "growx, wrap 25px:push"); if (lockOnBinding == null) { - content.add(new JButton(switchEditModeAction), "tag left"); + content.add(createImageButton(switchEditModeAction), "tag left"); } content.add(new JButton(approveFormatAction), "tag apply"); content.add(new JButton(cancelAction), "tag cancel"); @@ -707,7 +707,7 @@ public class FormatDialog extends JDialog { } }; - protected final Action switchEditModeAction = new AbstractAction(null, ResourceManager.getIcon("dialog.switch")) { + protected final Action switchEditModeAction = new AbstractAction("Switch Mode", ResourceManager.getIcon("dialog.switch")) { @Override public void actionPerformed(ActionEvent e) { diff --git a/source/net/filebot/ui/rename/RenameList.java b/source/net/filebot/ui/rename/RenameList.java index bf542086..46116e93 100644 --- a/source/net/filebot/ui/rename/RenameList.java +++ b/source/net/filebot/ui/rename/RenameList.java @@ -1,5 +1,6 @@ package net.filebot.ui.rename; +import static net.filebot.util.ui.SwingUI.*; import static java.util.Collections.*; import java.awt.BorderLayout; @@ -80,8 +81,8 @@ class RenameList extends FileBotList { getRemoveAction().setEnabled(true); buttonPanel = new JPanel(new MigLayout("insets 1.2mm, nogrid, fill", "align center")); - buttonPanel.add(new JButton(downAction), "gap 10px"); - buttonPanel.add(new JButton(upAction), "gap 0"); + buttonPanel.add(createImageButton(downAction), "gap 10px"); + buttonPanel.add(createImageButton(upAction), "gap 0"); buttonPanel.add(createLoadButton(), "gap 10px"); add(buttonPanel, BorderLayout.SOUTH); @@ -123,7 +124,7 @@ class RenameList extends FileBotList { private final LoadAction loadAction = new LoadAction(null); - private final AbstractAction upAction = new AbstractAction(null, ResourceManager.getIcon("action.up")) { + private final AbstractAction upAction = new AbstractAction("Align Up", ResourceManager.getIcon("action.up")) { public void actionPerformed(ActionEvent e) { int index = getListComponent().getSelectedIndex(); @@ -135,7 +136,7 @@ class RenameList extends FileBotList { } }; - private final AbstractAction downAction = new AbstractAction(null, ResourceManager.getIcon("action.down")) { + private final AbstractAction downAction = new AbstractAction("Align Down", ResourceManager.getIcon("action.down")) { public void actionPerformed(ActionEvent e) { int index = getListComponent().getSelectedIndex(); diff --git a/source/net/filebot/ui/subtitle/SubtitlePanel.java b/source/net/filebot/ui/subtitle/SubtitlePanel.java index 5846ef17..6ca6a497 100644 --- a/source/net/filebot/ui/subtitle/SubtitlePanel.java +++ b/source/net/filebot/ui/subtitle/SubtitlePanel.java @@ -64,7 +64,7 @@ public class SubtitlePanel extends AbstractSearchPanel