mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
* experiment with high-dpi icons
This commit is contained in:
parent
3d2763454f
commit
d9f280bc97
BIN
source/net/filebot/resources/action.select.png
Normal file
BIN
source/net/filebot/resources/action.select.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 261 B |
BIN
source/net/filebot/resources/action.select@2x.png
Normal file
BIN
source/net/filebot/resources/action.select@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 425 B |
Binary file not shown.
Before Width: | Height: | Size: 180 B |
BIN
source/net/filebot/resources/search.shooter@2x.png
Normal file
BIN
source/net/filebot/resources/search.shooter@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -5,26 +5,31 @@ import static javax.swing.BorderFactory.*;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
|
|
||||||
|
import javax.swing.Icon;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
import javax.swing.plaf.basic.BasicComboBoxUI;
|
import javax.swing.plaf.basic.BasicComboBoxUI;
|
||||||
import javax.swing.plaf.basic.BasicComboPopup;
|
import javax.swing.plaf.basic.BasicComboPopup;
|
||||||
import javax.swing.plaf.basic.ComboPopup;
|
import javax.swing.plaf.basic.ComboPopup;
|
||||||
|
|
||||||
import net.filebot.ResourceManager;
|
|
||||||
|
|
||||||
public class SimpleComboBox extends JComboBox {
|
public class SimpleComboBox extends JComboBox {
|
||||||
|
|
||||||
public SimpleComboBox() {
|
public SimpleComboBox(Icon dropDownArrowIcon) {
|
||||||
setUI(new SimpleComboBoxUI());
|
setUI(new SimpleComboBoxUI(dropDownArrowIcon));
|
||||||
setBorder(createEmptyBorder());
|
setBorder(createEmptyBorder());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class SimpleComboBoxUI extends BasicComboBoxUI {
|
private static class SimpleComboBoxUI extends BasicComboBoxUI {
|
||||||
|
|
||||||
|
private final Icon dropDownArrowIcon;
|
||||||
|
|
||||||
|
public SimpleComboBoxUI(Icon dropDownArrowIcon) {
|
||||||
|
this.dropDownArrowIcon = dropDownArrowIcon;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JButton createArrowButton() {
|
protected JButton createArrowButton() {
|
||||||
JButton button = new JButton(ResourceManager.getIcon("arrow.down"));
|
JButton button = new JButton(dropDownArrowIcon);
|
||||||
button.setContentAreaFilled(false);
|
button.setContentAreaFilled(false);
|
||||||
button.setBorderPainted(false);
|
button.setBorderPainted(false);
|
||||||
button.setFocusPainted(false);
|
button.setFocusPainted(false);
|
||||||
|
@ -130,7 +130,7 @@ class SubtitleAutoMatchDialog extends JDialog {
|
|||||||
table.setAutoCreateRowSorter(true);
|
table.setAutoCreateRowSorter(true);
|
||||||
table.setFillsViewportHeight(true);
|
table.setFillsViewportHeight(true);
|
||||||
|
|
||||||
JComboBox editor = new SimpleComboBox();
|
JComboBox editor = new SimpleComboBox(ResourceManager.getIcon("action.select"));
|
||||||
editor.setRenderer(new SubtitleOptionRenderer(true));
|
editor.setRenderer(new SubtitleOptionRenderer(true));
|
||||||
|
|
||||||
// disable selection
|
// disable selection
|
||||||
@ -361,7 +361,7 @@ class SubtitleAutoMatchDialog extends JDialog {
|
|||||||
|
|
||||||
private static class SubtitleMappingOptionRenderer extends DefaultTableCellRenderer {
|
private static class SubtitleMappingOptionRenderer extends DefaultTableCellRenderer {
|
||||||
|
|
||||||
private final JComboBox optionComboBox = new SimpleComboBox();
|
private final JComboBox optionComboBox = new SimpleComboBox(ResourceManager.getIcon("action.select"));
|
||||||
|
|
||||||
public SubtitleMappingOptionRenderer() {
|
public SubtitleMappingOptionRenderer() {
|
||||||
optionComboBox.setBackground(Color.white);
|
optionComboBox.setBackground(Color.white);
|
||||||
|
Loading…
Reference in New Issue
Block a user