diff --git a/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java index bf65a2ee4..15acf3b1b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -174,6 +174,8 @@ public class Configuration { public static final ConfigurationItem guiAvm2SplitPaneDividerLocation = null; @ConfigurationName("guiActionSplitPaneDividerLocation") public static final ConfigurationItem guiActionSplitPaneDividerLocation = null; + @ConfigurationName("guiPreviewSplitPaneDividerLocation") + public static final ConfigurationItem guiPreviewSplitPaneDividerLocation = null; @ConfigurationName("gui.splitPane1.dividerLocation") public static final ConfigurationItem guiSplitPane1DividerLocation = null; @ConfigurationName("gui.splitPane2.dividerLocation") diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index feb81baaa..86ab2058e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -702,7 +702,16 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } previewSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - previewSplitPane.setDividerLocation(300); + + previewSplitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent pce) { + if (splitsInited) { + Configuration.guiPreviewSplitPaneDividerLocation.set((int) pce.getNewValue()); + } + } + }); + JPanel pan = new JPanel(new BorderLayout()); JLabel prevLabel = new HeaderLabel(translate("swfpreview")); prevLabel.setHorizontalAlignment(SwingConstants.CENTER); @@ -825,7 +834,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec welcomePanel = createWelcomePanel(); add(welcomePanel, BorderLayout.CENTER); - //splitPane1.setDividerLocation(0.5); splitPane1.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() { @Override @@ -1087,6 +1095,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec confDivLoc = splitPane2.getHeight() * 3 / 5; } splitPane2.setDividerLocation(confDivLoc); + previewSplitPane.setDividerLocation(Configuration.guiPreviewSplitPaneDividerLocation.get(previewSplitPane.getWidth() / 2)); splitPos = splitPane2.getDividerLocation(); splitsInited = true; @@ -2382,7 +2391,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec if (tagObj instanceof TextTag) { TextTag textTag = (TextTag) tagObj; parametersPanel.setVisible(true); - previewSplitPane.setDividerLocation(previewSplitPane.getWidth() / 2); showDetailWithPreview(CARDTEXTPANEL); textValue.setContentType("text/swf_text"); textValue.setText(textTag.getFormattedText(textTag.getSwf().tags)); @@ -2784,7 +2792,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } parametersPanel.setVisible(true); - previewSplitPane.setDividerLocation(previewSplitPane.getWidth() / 2); fontPanel.showFontTag(ft); showDetailWithPreview(CARDFONTPANEL); }