From 9307c4e61e87c4ce3507e9dbd6fc9efc9aa49d5b Mon Sep 17 00:00:00 2001 From: Sandy Noble Date: Sun, 25 Jun 2017 21:50:44 +0100 Subject: [PATCH] Minor tweaks to window sizes --- SerialPortWindow.pde | 4 ++-- controlsActionsWindows.pde | 2 +- drawing.pde | 8 ++------ polargraphcontroller.pde | 13 +++++++------ 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/SerialPortWindow.pde b/SerialPortWindow.pde index 09b02a8..51bf488 100644 --- a/SerialPortWindow.pde +++ b/SerialPortWindow.pde @@ -31,7 +31,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort") .setPosition(10, 10) - .setSize(150, 100) + .setSize(150, 450) .setBarHeight(20) .setItemHeight(20) .plugTo(this, "dropdown_serialPort"); @@ -53,7 +53,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t // set the value of the actual control sl.setValue(portNo); - sl.setOpen(false); + sl.setOpen(true); return p; } diff --git a/controlsActionsWindows.pde b/controlsActionsWindows.pde index 0781e86..4f740e2 100644 --- a/controlsActionsWindows.pde +++ b/controlsActionsWindows.pde @@ -38,7 +38,7 @@ String DRAW_PIXELS_WINDOW_NAME = "drawPixelsWindow"; String DRAW_WRITING_WINDOW_NAME = "drawWritingWindow"; void button_mode_serialPortDialog() { - ControlFrameSimple cf = addSerialPortControlFrame("Serial Port", 200, 200, 20, 240, color( 100 ) ); + ControlFrameSimple cf = addSerialPortControlFrame("Serial Port", 200, 500, 20, 240, color( 100 ) ); } void button_mode_machineStoreDialog() { diff --git a/drawing.pde b/drawing.pde index a7c4072..e7b7059 100644 --- a/drawing.pde +++ b/drawing.pde @@ -120,9 +120,7 @@ void sendRequestMachineSize() void sendMachineSpec() { // ask for input to get the new machine size - String command = CMD_CHANGEMACHINENAME+newMachineName+",END"; - addToCommandQueue(command); - command = CMD_CHANGEMACHINESIZE+getDisplayMachine().inMM(getDisplayMachine().getWidth())+","+getDisplayMachine().inMM(getDisplayMachine().getHeight())+",END"; + String command = CMD_CHANGEMACHINESIZE+getDisplayMachine().inMM(getDisplayMachine().getWidth())+","+getDisplayMachine().inMM(getDisplayMachine().getHeight())+",END"; addToCommandQueue(command); command = CMD_CHANGEMACHINEMMPERREV+int(getDisplayMachine().getMMPerRev())+",END"; addToCommandQueue(command); @@ -969,6 +967,4 @@ void sendStopSwirling() void sendDrawRandomSprite(String spriteFilename) { addToCommandQueue(CMD_DRAW_RANDOM_SPRITE+","+spriteFilename+",100,500,END"); -} - - +} \ No newline at end of file diff --git a/polargraphcontroller.pde b/polargraphcontroller.pde index 3be66f8..405aedb 100644 --- a/polargraphcontroller.pde +++ b/polargraphcontroller.pde @@ -57,8 +57,8 @@ import java.awt.BorderLayout; import java.lang.reflect.Method; int majorVersionNo = 2; -int minorVersionNo = 4; -int buildNo = 2; +int minorVersionNo = 5; +int buildNo = 0; String programTitle = "Polargraph Controller v" + majorVersionNo + "." + minorVersionNo + " build " + buildNo; ControlP5 cp5; @@ -565,6 +565,7 @@ void setup() RG.init(this); loadFromPropertiesFile(); + size(200, 200); size(windowWidth, windowHeight); this.cp5 = new ControlP5(this); initTabs(); @@ -651,10 +652,10 @@ void addEventListeners() public void componentResized(ComponentEvent event) { windowResized(); -// if (event.getSource()==frame) -// { -// windowResized(); -// } + if (event.getSource()==frame) + { + windowResized(); + } } } );