improve tooltips
authorNiki Roo <niki@nikiroo.be>
Fri, 1 May 2020 20:44:02 +0000 (22:44 +0200)
committerNiki Roo <niki@nikiroo.be>
Fri, 1 May 2020 20:44:02 +0000 (22:44 +0200)
src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java
src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java

index 634555f49243e87649b4316478db64160bc98b40..cc16115a49403e4d3942a0fcafbc60a67d09a065 100644 (file)
@@ -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);
                }
        }
index e84816b21d731a1fd6e641686d1e7ec85b4f70c3..1a3bdca83a0d65186f3111b1312b4248bbed6bcc 100644 (file)
@@ -68,7 +68,6 @@ public class PropertiesPanel extends JPanel {
                Map<String, String> 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