mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
* fix image button size issues
This commit is contained in:
parent
18afec0593
commit
c4a582ff9b
@ -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) {
|
||||
|
@ -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<E> extends FileBotList<E> {
|
||||
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<E> extends FileBotList<E> {
|
||||
|
||||
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<E> extends FileBotList<E> {
|
||||
}
|
||||
};
|
||||
|
||||
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();
|
||||
|
@ -64,7 +64,7 @@ public class SubtitlePanel extends AbstractSearchPanel<SubtitleProvider, Subtitl
|
||||
|
||||
// add after text field
|
||||
add(languageComboBox, "gap indent, sgy button", 1);
|
||||
add(createImageButton(setUserAction), "width 26px!, height 26px!, gap rel, sgy button", 2);
|
||||
add(createImageButton(setUserAction), "w pref!, h pref!, gap rel, sgy button", 2);
|
||||
|
||||
// add at the top right corner
|
||||
add(uploadDropTarget, "width 1.45cm!, height 1.2cm!, pos n 0% 100%-1.8cm n", 0);
|
||||
|
@ -91,9 +91,15 @@ public final class SwingUI {
|
||||
JButton button = new JButton(action);
|
||||
button.setHideActionText(true);
|
||||
button.setToolTipText(String.valueOf(action.getValue(Action.NAME)));
|
||||
button.setOpaque(false);
|
||||
button.setVerticalTextPosition(SwingConstants.BOTTOM);
|
||||
button.setPreferredSize(new Dimension(28, 28));
|
||||
button.setOpaque(false);
|
||||
|
||||
if (Settings.isMacApp()) {
|
||||
button.setPreferredSize(new Dimension(28, 27));
|
||||
} else {
|
||||
button.setPreferredSize(new Dimension(26, 26));
|
||||
}
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user