From 868abafd94f4fa91495d0a5f040ad89d71f0651f Mon Sep 17 00:00:00 2001 From: Leon Dieter <Leon Dieter@DESKTOP-L4JC8N4> Date: Mon, 15 Mar 2021 16:58:43 +0100 Subject: [PATCH] minor changes --- .../ardublock/simulator/view/GUI.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/tec/letsgoing/ardublock/simulator/view/GUI.java b/src/tec/letsgoing/ardublock/simulator/view/GUI.java index 0d61cbf..9add0a9 100644 --- a/src/tec/letsgoing/ardublock/simulator/view/GUI.java +++ b/src/tec/letsgoing/ardublock/simulator/view/GUI.java @@ -122,7 +122,7 @@ public class GUI extends JFrame implements Runnable, ActionListener { modulPanel.add(modules[2].getPane(), BorderLayout.EAST); modulPanel.add(modules[3].getPane(), BorderLayout.PAGE_END); topPanel.add(modulPanel); - mainPane.add(topPanel, BorderLayout.CENTER); + mainPane.add(topPanel, BorderLayout.NORTH); //Panel der Buttons auf der rechten Seite wird ausgeblendet //mainPane.add(createControlPanel(simu), BorderLayout.EAST); mainPane.add(createSerialLog(), BorderLayout.PAGE_END); @@ -144,15 +144,18 @@ public class GUI extends JFrame implements Runnable, ActionListener { WindowWidth = getWidth(); topPanelWidth = topPanel.getWidth(); topPanelHeight = topPanel.getHeight(); - + System.out.println("WindowWidth" + WindowWidth); + System.out.println("WindowHeight" + WindowHeight); + System.out.println("toppanelWidth" + topPanelWidth); + System.out.println("toppanelHeight" + topPanelHeight); //GUI wird nur gleichm��ig skaliert mit den Gr��en des kleineren Seitenverh�tlnisses - if(topPanelWidth <= topPanelHeight) { - xscale = topPanelWidth; - yscale = topPanelWidth; + if(WindowWidth <= WindowHeight) { + xscale = WindowWidth; + yscale = WindowWidth; } else { - xscale = topPanelHeight; - yscale = topPanelHeight; + xscale = WindowHeight; + yscale = WindowHeight; } //GUI wird upgedatet @@ -309,7 +312,7 @@ public class GUI extends JFrame implements Runnable, ActionListener { if(size >= 1000) { - serialLog.setRows(4); // Anzahl der Angezeigten Reihen + serialLog.setRows(3); // Anzahl der Angezeigten Reihen } else if(size < 1000 && size >= 800) { serialLog.setRows(6); // Anzahl der Angezeigten Reihen -- GitLab