From efc7f818242c235c09828fbe701252dedfb7d848 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 1 Jul 2009 16:14:21 +0000 Subject: [PATCH] * some tuning for gtk laf --- source/net/sourceforge/filebot/media.types | 1 - source/net/sourceforge/filebot/ui/AbstractSearchPanel.java | 2 +- .../sourceforge/filebot/ui/panel/rename/HistoryDialog.java | 1 + .../filebot/ui/panel/rename/RenameListCellRenderer.java | 2 ++ .../filebot/ui/panel/subtitle/SubtitleViewer.java | 1 + .../sourceforge/tuned/ui/DefaultFancyListCellRenderer.java | 7 +++++-- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/source/net/sourceforge/filebot/media.types b/source/net/sourceforge/filebot/media.types index ed4b880b..210f38df 100644 --- a/source/net/sourceforge/filebot/media.types +++ b/source/net/sourceforge/filebot/media.types @@ -11,7 +11,6 @@ list txt - diff --git a/source/net/sourceforge/filebot/ui/AbstractSearchPanel.java b/source/net/sourceforge/filebot/ui/AbstractSearchPanel.java index 21292668..b2f63782 100644 --- a/source/net/sourceforge/filebot/ui/AbstractSearchPanel.java +++ b/source/net/sourceforge/filebot/ui/AbstractSearchPanel.java @@ -80,7 +80,7 @@ public abstract class AbstractSearchPanel extends JComponent { try { // restore selected subtitle client - searchTextField.getSelectButton().setSelectedIndex(Integer.parseInt(getSettings().get("engine.selected"))); + searchTextField.getSelectButton().setSelectedIndex(Integer.parseInt(getSettings().get("engine.selected", "0"))); } catch (Exception e) { // log and ignore Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage(), e); diff --git a/source/net/sourceforge/filebot/ui/panel/rename/HistoryDialog.java b/source/net/sourceforge/filebot/ui/panel/rename/HistoryDialog.java index e653c9a1..61eb2081 100644 --- a/source/net/sourceforge/filebot/ui/panel/rename/HistoryDialog.java +++ b/source/net/sourceforge/filebot/ui/panel/rename/HistoryDialog.java @@ -294,6 +294,7 @@ class HistoryDialog extends JDialog { private JTable createTable(TableModel model) { JTable table = new JTable(model); + table.setBackground(Color.white); table.setAutoCreateRowSorter(true); table.setFillsViewportHeight(true); diff --git a/source/net/sourceforge/filebot/ui/panel/rename/RenameListCellRenderer.java b/source/net/sourceforge/filebot/ui/panel/rename/RenameListCellRenderer.java index d2b09e4d..534d0ed9 100644 --- a/source/net/sourceforge/filebot/ui/panel/rename/RenameListCellRenderer.java +++ b/source/net/sourceforge/filebot/ui/panel/rename/RenameListCellRenderer.java @@ -36,6 +36,8 @@ class RenameListCellRenderer extends DefaultFancyListCellRenderer { public RenameListCellRenderer(RenameModel renameModel) { + super(new Insets(4, 7, 4, 7)); + this.renameModel = renameModel; setHighlightingEnabled(false); diff --git a/source/net/sourceforge/filebot/ui/panel/subtitle/SubtitleViewer.java b/source/net/sourceforge/filebot/ui/panel/subtitle/SubtitleViewer.java index 7f1cf914..ecc62c6c 100644 --- a/source/net/sourceforge/filebot/ui/panel/subtitle/SubtitleViewer.java +++ b/source/net/sourceforge/filebot/ui/panel/subtitle/SubtitleViewer.java @@ -143,6 +143,7 @@ class SubtitleViewer extends JFrame { private JTable createTable(TableModel model) { JTable table = new JTable(model); + table.setBackground(Color.white); table.setAutoCreateRowSorter(true); table.setFillsViewportHeight(true); table.setRowHeight(18); diff --git a/source/net/sourceforge/tuned/ui/DefaultFancyListCellRenderer.java b/source/net/sourceforge/tuned/ui/DefaultFancyListCellRenderer.java index bd98d376..ff3c8eb9 100644 --- a/source/net/sourceforge/tuned/ui/DefaultFancyListCellRenderer.java +++ b/source/net/sourceforge/tuned/ui/DefaultFancyListCellRenderer.java @@ -19,13 +19,16 @@ public class DefaultFancyListCellRenderer extends AbstractFancyListCellRenderer public DefaultFancyListCellRenderer() { add(label); } - public DefaultFancyListCellRenderer(int padding) { super(new Insets(padding, padding, padding, padding)); add(label); } - + + public DefaultFancyListCellRenderer(Insets padding) { + super(padding); + add(label); + } protected DefaultFancyListCellRenderer(int padding, int margin, Color selectedBorderColor) { super(new Insets(padding, padding, padding, padding), new Insets(margin, margin, margin, margin), selectedBorderColor);