1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-09 13:59:49 -04:00

Fix various Dark Mode issues

This commit is contained in:
Reinhard Pointner 2019-02-27 23:18:57 +07:00
parent 7836249b1a
commit 35f8317fd3
10 changed files with 19 additions and 21 deletions

View File

@ -102,7 +102,7 @@ public class ThemeSupport {
UIManager.setLookAndFeel(new DarculaLaf());
Color selectionBackground = new Color(0x39698a);
Color componentBackground = new Color(0x313131);
Color componentBackground = new Color(0x3A3D3E);
UIManager.put("List.selectionBackground", selectionBackground);
UIManager.put("ComboBox.selectionBackground", selectionBackground);

View File

@ -1,8 +1,8 @@
package net.filebot.ui.episodelist;
import static net.filebot.ui.ThemeSupport.*;
import static net.filebot.ui.episodelist.SeasonSpinnerModel.*;
import java.awt.Color;
import java.text.ParseException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -52,6 +52,6 @@ class SeasonSpinnerEditor extends DefaultEditor {
}));
getTextField().setHorizontalAlignment(SwingConstants.RIGHT);
getTextField().setBackground(Color.white);
getTextField().setBackground(getPanelBackground());
}
}

View File

@ -3,9 +3,9 @@ package net.filebot.ui.filter;
import static javax.swing.BorderFactory.*;
import static net.filebot.MediaTypes.*;
import static net.filebot.media.XattrMetaInfo.*;
import static net.filebot.ui.ThemeSupport.*;
import static net.filebot.util.FileUtilities.*;
import java.awt.Color;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@ -37,8 +37,8 @@ class AttributeTool extends Tool<TableModel> {
table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setBackground(Color.white);
table.setGridColor(new Color(0xEEEEEE));
table.setBackground(getPanelBackground());
table.setGridColor(getColor(0xEEEEEE));
table.setRowHeight(25);
JScrollPane scrollPane = new JScrollPane(table);

View File

@ -2,6 +2,7 @@ package net.filebot.ui.filter;
import static net.filebot.Logging.*;
import static net.filebot.UserFiles.*;
import static net.filebot.ui.ThemeSupport.*;
import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.SwingUI.*;
@ -56,8 +57,8 @@ class ExtractTool extends Tool<TableModel> {
table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setBackground(Color.white);
table.setGridColor(new Color(0xEEEEEE));
table.setBackground(getPanelBackground());
table.setGridColor(getColor(0xEEEEEE));
table.setRowHeight(25);
JScrollPane tableScrollPane = new JScrollPane(table);

View File

@ -4,9 +4,9 @@ import static java.util.Collections.*;
import static javax.swing.BorderFactory.*;
import static net.filebot.Logging.*;
import static net.filebot.MediaTypes.*;
import static net.filebot.ui.ThemeSupport.*;
import static net.filebot.util.FileUtilities.*;
import java.awt.Color;
import java.io.File;
import java.util.List;
import java.util.Map;
@ -42,8 +42,8 @@ class MediaInfoTool extends Tool<TableModel> {
table.setCellSelectionEnabled(true);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setBackground(Color.white);
table.setGridColor(new Color(0xEEEEEE));
table.setBackground(getPanelBackground());
table.setGridColor(getColor(0xEEEEEE));
table.setRowHeight(25);
JScrollPane scrollPane = new JScrollPane(table);

View File

@ -3,10 +3,10 @@ package net.filebot.ui.rename;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.util.stream.Collectors.*;
import static net.filebot.ui.ThemeSupport.*;
import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.SwingUI.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Window;
@ -67,7 +67,7 @@ class ConflictDialog extends JDialog {
table.addMouseListener(new OpenListener());
// force white background (e.g. GTK LaF default table background is gray)
setBackground(Color.WHITE);
setBackground(getPanelBackground());
JComponent c = (JComponent) getContentPane();
c.setLayout(new MigLayout("insets dialog, nogrid, fill", "", "[fill][pref!]"));

View File

@ -15,7 +15,6 @@ import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.RegularExpressions.*;
import static net.filebot.util.ui.SwingUI.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Window;
@ -286,7 +285,7 @@ class HistoryDialog extends JDialog {
private JTable createTable(TableModel model) {
JTable table = new JTable(model);
table.setBackground(Color.white);
table.setBackground(getPanelBackground());
table.setAutoCreateRowSorter(true);
table.setFillsViewportHeight(true);

View File

@ -136,7 +136,7 @@ public class PresetEditor extends JDialog {
providerCombo.addItemListener((evt) -> updateComponentStates());
updateComponentStates();
setSize(730, 570);
setSize(730, 600);
// add helpful tooltips
filterEditor.setToolTipText(FILE_FILTER_TOOLTIP);

View File

@ -2,8 +2,8 @@
package net.filebot.ui.sfv;
import static net.filebot.hash.VerificationUtilities.*;
import static net.filebot.ui.ThemeSupport.*;
import java.awt.Color;
import java.awt.event.MouseEvent;
import javax.swing.JTable;
@ -29,8 +29,8 @@ class ChecksumTable extends JTable {
setUI(new DragDropRowTableUI());
// force white background (e.g. gtk-laf default table background is gray)
setBackground(Color.WHITE);
setGridColor(Color.LIGHT_GRAY);
setBackground(getPanelBackground());
setGridColor(getColor(0xEEEEEE));
// highlight CRC32 patterns in filenames in green and with smaller font-size
setDefaultRenderer(String.class, new HighlightPatternCellRenderer(EMBEDDED_CHECKSUM));

View File

@ -44,9 +44,7 @@ import javax.swing.table.TableRowSorter;
import net.filebot.ResourceManager;
import net.filebot.subtitle.SubtitleElement;
import net.filebot.util.ui.GradientStyle;
import net.filebot.util.ui.LazyDocumentListener;
import net.filebot.util.ui.notification.SeparatorBorder;
import net.filebot.util.ui.notification.SeparatorBorder.Position;
import net.miginfocom.swing.MigLayout;