From: Niki Roo Date: Mon, 4 May 2020 21:43:10 +0000 (+0200) Subject: small UI tweaks X-Git-Tag: fanfix-swing-1.2.0~9 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=cb8f09c7bdb24ce13e1e4aa98d505f9ae1d118ca;p=fanfix-swing.git small UI tweaks --- diff --git a/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java b/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java index ecd4cee5..82c1e873 100644 --- a/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java +++ b/src/be/nikiroo/fanfix_swing/gui/PropertiesPanel.java @@ -93,6 +93,7 @@ public class PropertiesPanel extends JPanel { JPanel mainPanelValues = new JPanel(); mainPanelValues .setLayout(new BoxLayout(mainPanelValues, BoxLayout.Y_AXIS)); + mainPanelValues.setBackground(UIManager.getColor("List.background")); mainPanel.add(mainPanelKeys, BorderLayout.WEST); mainPanel.add(UIUtils.scroll(mainPanelValues, true, false), @@ -105,6 +106,7 @@ public class PropertiesPanel extends JPanel { jKey.getFont().getSize())); jKey.setEditable(false); jKey.setLineWrap(false); + jKey.setOpaque(false); jKey.setBackground(trans); listenables.add(jKey); mainPanelKeys.add(jKey); @@ -112,10 +114,10 @@ public class PropertiesPanel extends JPanel { final JTextArea jValue = new JTextArea(desc.get(key)); jValue.setEditable(false); jValue.setLineWrap(false); + jValue.setOpaque(false); + jValue.setBackground(trans); listenables.add(jValue); mainPanelValues.add(jValue); - - mainPanelValues.setBackground(jValue.getBackground()); } // Image diff --git a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerNonImages.java b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerNonImages.java index 56015abc..08811146 100644 --- a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerNonImages.java +++ b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerNonImages.java @@ -196,6 +196,12 @@ public class ViewerNonImages extends JFrame { area.setCaretPosition(0); area.scrollRectToVisible(new Rectangle()); + // To work around the fact that sometimes the space of the + // descpane is kept and the title bar has to take it + Rectangle pos = getBounds(); + pack(); + setBounds(pos); + // So we can use the keyboard navigation even after a // toolbar click area.requestFocus();