diff --git a/res/gui/display_layout.xml b/res/gui/display_layout.xml index e2ed7b156cd..b7d8d51417a 100644 --- a/res/gui/display_layout.xml +++ b/res/gui/display_layout.xml @@ -1,12 +1,12 @@ - + 0 0 - 1920 - 1090 + 1024 + 687 @@ -17,7 +17,7 @@ 0 0 197 - 1090 + 687 @@ -28,7 +28,7 @@ 0 0 197 - 212 + 130 @@ -47,7 +47,7 @@ 0 - 212 + 130 197 5 @@ -62,9 +62,9 @@ 0 - 217 + 135 197 - 288 + 146 @@ -83,7 +83,7 @@ 0 - 505 + 281 197 5 @@ -98,9 +98,9 @@ 0 - 510 + 286 197 - 148 + 104 @@ -119,7 +119,7 @@ 0 - 658 + 390 197 5 @@ -134,9 +134,9 @@ 0 - 663 + 395 197 - 191 + 136 @@ -155,7 +155,7 @@ 0 - 854 + 531 197 5 @@ -170,9 +170,9 @@ 0 - 859 + 536 197 - 231 + 151 @@ -205,7 +205,7 @@ 197 0 5 - 1090 + 687 @@ -219,8 +219,8 @@ 202 0 - 1409 - 1090 + 566 + 687 @@ -230,8 +230,8 @@ 202 0 - 1409 - 236 + 566 + 1 @@ -250,8 +250,8 @@ 202 - 236 - 1409 + 1 + 566 5 @@ -265,9 +265,9 @@ 202 - 241 - 1409 - 195 + 6 + 566 + 282 @@ -286,8 +286,8 @@ 202 - 436 - 1409 + 288 + 566 5 @@ -301,9 +301,9 @@ 202 - 441 - 1409 - 236 + 293 + 566 + 277 @@ -322,8 +322,8 @@ 202 - 677 - 1409 + 570 + 566 5 @@ -337,9 +337,9 @@ 202 - 682 - 1409 - 229 + 575 + 566 + 1 @@ -358,8 +358,8 @@ 202 - 911 - 1409 + 576 + 566 5 @@ -373,9 +373,9 @@ 202 - 916 - 1409 - 174 + 581 + 566 + 106 @@ -408,10 +408,10 @@ - 1611 + 768 0 5 - 1090 + 687 @@ -423,10 +423,10 @@ - 1616 + 773 0 - 304 - 1090 + 251 + 687 @@ -434,10 +434,10 @@ - 1616 + 773 0 - 304 - 540 + 251 + 339 @@ -455,9 +455,9 @@ - 1616 - 540 - 304 + 773 + 339 + 251 5 @@ -470,10 +470,10 @@ - 1616 - 545 - 304 - 545 + 773 + 344 + 251 + 343 diff --git a/src/main/java/forge/GuiDisplay4.java b/src/main/java/forge/GuiDisplay4.java index a15d7657b4f..b9a80621810 100644 --- a/src/main/java/forge/GuiDisplay4.java +++ b/src/main/java/forge/GuiDisplay4.java @@ -762,7 +762,11 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo @Override public void windowClosed(WindowEvent e) { + + // Write the layout to the new file, usually + // res/gui/display_new_layout.xml File f = ForgeProps.getFile(LAYOUT_NEW); + Node layout = pane.getMultiSplitLayout().getModel(); try { XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(f))); @@ -776,7 +780,16 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo //making the multi split pane Node model; + + // Try to load the latest saved layout, usually + // res/gui/display_new_layout.xml File f = ForgeProps.getFile(LAYOUT_NEW); + + // If the new file does not exist, read the configuration from the + // default layout, usually res/gui/display_layout.xml + if (!f.exists()) { + f = ForgeProps.getFile(LAYOUT); + } try { XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(f))); model = (Node) decoder.readObject();