Minor tweaks to window sizes

This commit is contained in:
Sandy Noble 2017-06-25 21:50:44 +01:00
parent d74881f2de
commit 9307c4e61e
4 changed files with 12 additions and 15 deletions

View File

@ -31,7 +31,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort") ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort")
.setPosition(10, 10) .setPosition(10, 10)
.setSize(150, 100) .setSize(150, 450)
.setBarHeight(20) .setBarHeight(20)
.setItemHeight(20) .setItemHeight(20)
.plugTo(this, "dropdown_serialPort"); .plugTo(this, "dropdown_serialPort");
@ -53,7 +53,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
// set the value of the actual control // set the value of the actual control
sl.setValue(portNo); sl.setValue(portNo);
sl.setOpen(false); sl.setOpen(true);
return p; return p;
} }

View File

@ -38,7 +38,7 @@ String DRAW_PIXELS_WINDOW_NAME = "drawPixelsWindow";
String DRAW_WRITING_WINDOW_NAME = "drawWritingWindow"; String DRAW_WRITING_WINDOW_NAME = "drawWritingWindow";
void button_mode_serialPortDialog() { 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() { void button_mode_machineStoreDialog() {

View File

@ -120,9 +120,7 @@ void sendRequestMachineSize()
void sendMachineSpec() void sendMachineSpec()
{ {
// ask for input to get the new machine size // ask for input to get the new machine size
String command = CMD_CHANGEMACHINENAME+newMachineName+",END"; String command = CMD_CHANGEMACHINESIZE+getDisplayMachine().inMM(getDisplayMachine().getWidth())+","+getDisplayMachine().inMM(getDisplayMachine().getHeight())+",END";
addToCommandQueue(command);
command = CMD_CHANGEMACHINESIZE+getDisplayMachine().inMM(getDisplayMachine().getWidth())+","+getDisplayMachine().inMM(getDisplayMachine().getHeight())+",END";
addToCommandQueue(command); addToCommandQueue(command);
command = CMD_CHANGEMACHINEMMPERREV+int(getDisplayMachine().getMMPerRev())+",END"; command = CMD_CHANGEMACHINEMMPERREV+int(getDisplayMachine().getMMPerRev())+",END";
addToCommandQueue(command); addToCommandQueue(command);
@ -969,6 +967,4 @@ void sendStopSwirling()
void sendDrawRandomSprite(String spriteFilename) void sendDrawRandomSprite(String spriteFilename)
{ {
addToCommandQueue(CMD_DRAW_RANDOM_SPRITE+","+spriteFilename+",100,500,END"); addToCommandQueue(CMD_DRAW_RANDOM_SPRITE+","+spriteFilename+",100,500,END");
} }

View File

@ -57,8 +57,8 @@ import java.awt.BorderLayout;
import java.lang.reflect.Method; import java.lang.reflect.Method;
int majorVersionNo = 2; int majorVersionNo = 2;
int minorVersionNo = 4; int minorVersionNo = 5;
int buildNo = 2; int buildNo = 0;
String programTitle = "Polargraph Controller v" + majorVersionNo + "." + minorVersionNo + " build " + buildNo; String programTitle = "Polargraph Controller v" + majorVersionNo + "." + minorVersionNo + " build " + buildNo;
ControlP5 cp5; ControlP5 cp5;
@ -565,6 +565,7 @@ void setup()
RG.init(this); RG.init(this);
loadFromPropertiesFile(); loadFromPropertiesFile();
size(200, 200);
size(windowWidth, windowHeight); size(windowWidth, windowHeight);
this.cp5 = new ControlP5(this); this.cp5 = new ControlP5(this);
initTabs(); initTabs();
@ -651,10 +652,10 @@ void addEventListeners()
public void componentResized(ComponentEvent event) public void componentResized(ComponentEvent event)
{ {
windowResized(); windowResized();
// if (event.getSource()==frame) if (event.getSource()==frame)
// { {
// windowResized(); windowResized();
// } }
} }
} }
); );