diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index cb9307942..a47d62473 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -1027,6 +1027,17 @@ public final class Configuration { @ConfigurationDefaultString("") @ConfigurationInternal public static ConfigurationItem recentColors = null; + + + @ConfigurationDefaultDouble(0.7) + @ConfigurationName("gui.splitPaneEasyVertical.dividerLocationPercent") + @ConfigurationInternal + public static ConfigurationItem guiSplitPaneEasyVerticaldividerLocationPercent = null; + + @ConfigurationDefaultDouble(0.7) + @ConfigurationName("gui.splitPaneEasyHorizontal.dividerLocationPercent") + @ConfigurationInternal + public static ConfigurationItem guiSplitPaneEasyHorizontaldividerLocationPercent = null; private enum OSId { WINDOWS, OSX, UNIX diff --git a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java index 6b3f2327c..8c02dd12d 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java @@ -19,12 +19,14 @@ package com.jpexs.decompiler.flash.easygui; import com.jpexs.decompiler.flash.DefineBeforeUsageFixer; import com.jpexs.decompiler.flash.ReadOnlyTagList; import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.gui.FasterScrollPane; import com.jpexs.decompiler.flash.gui.ImagePanel; import com.jpexs.decompiler.flash.gui.RegistrationPointPosition; import com.jpexs.decompiler.flash.gui.TimelinedMaker; import com.jpexs.decompiler.flash.gui.TransformPanel; import com.jpexs.decompiler.flash.gui.View; +import com.jpexs.decompiler.flash.gui.controls.JPersistentSplitPane; import com.jpexs.decompiler.flash.tags.DefineSpriteTag; import com.jpexs.decompiler.flash.tags.PlaceObject2Tag; import com.jpexs.decompiler.flash.tags.RemoveObject2Tag; @@ -157,7 +159,7 @@ public class EasyPanel extends JPanel { @Override public String getDescription() { - return transformEnabled ? "Transform" : "Move"; + return EasyStrings.translate(transformEnabled ? "action.transform" : "action.move"); } }); @@ -268,7 +270,7 @@ public class EasyPanel extends JPanel { @Override public String getDescription() { - return "Add to stage"; + return EasyStrings.translate("action.addToStage"); } }); @@ -365,7 +367,7 @@ public class EasyPanel extends JPanel { } }); - verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel, timelinePanel); + verticalSplitPane = new JPersistentSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel, timelinePanel, Configuration.guiSplitPaneEasyVerticaldividerLocationPercent); libraryTreeTable = new LibraryTreeTable(); JScrollPane libraryScrollPane = new FasterScrollPane(libraryTreeTable); @@ -418,7 +420,7 @@ public class EasyPanel extends JPanel { } }); - horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, verticalSplitPane, rightTabbedPane); + horizontalSplitPane = new JPersistentSplitPane(JSplitPane.HORIZONTAL_SPLIT, verticalSplitPane, rightTabbedPane, Configuration.guiSplitPaneEasyHorizontaldividerLocationPercent); if (View.isOceanic()) { libraryScrollPane.getViewport().setBackground(Color.white); @@ -461,10 +463,4 @@ public class EasyPanel extends JPanel { timelinePanel.setTimelined(swf); } - @Override - public void setVisible(boolean b) { - super.setVisible(b); - verticalSplitPane.setDividerLocation(0.7); - horizontalSplitPane.setDividerLocation(0.7); - } } diff --git a/src/com/jpexs/decompiler/flash/easygui/TimelineBodyPanel.java b/src/com/jpexs/decompiler/flash/easygui/TimelineBodyPanel.java index f67cee4ee..b04d6a217 100644 --- a/src/com/jpexs/decompiler/flash/easygui/TimelineBodyPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/TimelineBodyPanel.java @@ -537,13 +537,13 @@ public class TimelineBodyPanel extends JPanel implements MouseListener, KeyListe } emptyDepth = thisEmpty && !somethingBefore && !somethingAfter; - JMenuItem addKeyFrameMenuItem = new JMenuItem("Add keyframe"); + JMenuItem addKeyFrameMenuItem = new JMenuItem(EasyStrings.translate("action.addKeyFrame")); addKeyFrameMenuItem.addActionListener(this::addKeyFrame); - JMenuItem addKeyFrameEmptyBeforeMenuItem = new JMenuItem("Add keyframe with blank frames before"); + JMenuItem addKeyFrameEmptyBeforeMenuItem = new JMenuItem(EasyStrings.translate("action.addKeyFrameWithBlankFrameBefore")); addKeyFrameEmptyBeforeMenuItem.addActionListener(this::addKeyFrameEmptyBefore); - JMenuItem addFrameMenuItem = new JMenuItem("Add frame"); + JMenuItem addFrameMenuItem = new JMenuItem(EasyStrings.translate("action.addFrame")); addFrameMenuItem.addActionListener(this::addFrame); - JMenuItem removeFrameMenuItem = new JMenuItem("Remove frame"); + JMenuItem removeFrameMenuItem = new JMenuItem(EasyStrings.translate("action.removeFrame")); removeFrameMenuItem.addActionListener(this::removeFrame); boolean multiSelect = cursor != null && (cursor.width > 1 || cursor.height > 1); @@ -703,7 +703,7 @@ public class TimelineBodyPanel extends JPanel implements MouseListener, KeyListe @Override public String getDescription() { - return "Remove frame"; + return EasyStrings.translate("action.removeFrame"); } }); } @@ -775,7 +775,7 @@ public class TimelineBodyPanel extends JPanel implements MouseListener, KeyListe @Override public String getDescription() { - return "Add key frame"; + return EasyStrings.translate("action.addKeyFrame"); } }); } @@ -839,7 +839,7 @@ public class TimelineBodyPanel extends JPanel implements MouseListener, KeyListe @Override public String getDescription() { - return "Add key frame"; + return EasyStrings.translate("action.addKeyFrame"); //Intentionally not "...with blank frames before" } }); } @@ -1006,7 +1006,7 @@ public class TimelineBodyPanel extends JPanel implements MouseListener, KeyListe @Override public String getDescription() { - return "Add frame"; + return EasyStrings.translate("action.addFrame"); } }); } diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index b4070d4a0..e5f11bf1a 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -535,3 +535,9 @@ config.description.linkAllClasses = Add special script that links all (sound, fo #after 21.1.0 config.name.recentColors = Recent colors config.description.recentColors = Recent colors in the color dialog + +config.name.gui.splitPaneEasyVertical.dividerLocationPercent = (Internal) Easy UI vertical splitter location +config.description.gui.splitPaneEasyVertical.dividerLocationPercent = + +config.name.gui.splitPaneEasyHorizontal.dividerLocationPercent = (Internal) Easy UI horizontal splitter location +config.description.gui.splitPaneEasyHorizontal.dividerLocationPercent = \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/gui/locales/EasyPanel.properties b/src/com/jpexs/decompiler/flash/gui/locales/EasyPanel.properties index 88b052a28..bc48e7b0e 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/EasyPanel.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/EasyPanel.properties @@ -46,4 +46,10 @@ redo.cannot = Cannot redo transform = Transform - +action.addFrame = Add frame +action.addKeyFrame = Add key frame +action.addKeyFrameWithBlankFrameBefore = Add keyframe with blank frames before +action.removeFrame = Remove frame +action.transform = Transform +action.move = Move +action.addToStage = Add to stage