From 244375bef14ad24227a6ca0fd705c8203acaa0d1 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 1 May 2020 22:44:02 +0200 Subject: [PATCH] improve tooltips --- src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java | 5 ++--- src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java b/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java index 634555f4..cc16115a 100644 --- a/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java +++ b/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java @@ -36,17 +36,16 @@ public class PropertiesFrame extends JDialog { setLayout(new BorderLayout()); add(desc, BorderLayout.NORTH); - this.setSize(800, desc.getHeight() + 0); + this.setSize(600, desc.getHeight() + 0); } @Override - public void setVisible(boolean b) { + public void setVisible(final boolean b) { super.setVisible(b); if (b) { int titleBarHeight = Math .abs(getContentPane().getHeight() - getHeight()); - this.setSize(600, desc.getHeight() + titleBarHeight); } } diff --git a/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java b/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java index e84816b2..1a3bdca8 100644 --- a/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java +++ b/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java @@ -68,7 +68,6 @@ public class PropertiesPanel extends JPanel { Map desc = BasicReader.getMetaDesc(meta); Color trans = new Color(0, 0, 0, 1); - Color base = mainPanelValues.getBackground(); for (String key : desc.keySet()) { JTextArea jKey = new JTextArea(key); jKey.setFont(new Font(jKey.getFont().getFontName(), Font.BOLD, @@ -82,9 +81,10 @@ public class PropertiesPanel extends JPanel { final JTextArea jValue = new JTextArea(desc.get(key)); jValue.setEditable(false); jValue.setLineWrap(false); - jValue.setBackground(base); listenables.add(jValue); mainPanelValues.add(jValue); + + mainPanelValues.setBackground(jValue.getBackground()); } // Image -- 2.27.0