mirror of
https://github.com/processing/processing4.git
synced 2026-05-06 19:06:19 +02:00
clean up some button and text field placement issues with osx
This commit is contained in:
+11
-6
@@ -373,18 +373,23 @@ public class EditorStatus extends JPanel implements ActionListener {
|
||||
int noLeft = cancelLeft - eachButton;
|
||||
int yesLeft = noLeft - eachButton;
|
||||
|
||||
System.out.println("setting button height to " + Preferences.BUTTON_HEIGHT);
|
||||
yesButton.setLocation(yesLeft, top);
|
||||
noButton.setLocation(noLeft, top);
|
||||
cancelButton.setLocation(cancelLeft, top);
|
||||
editField.setLocation(yesLeft - Preferences.BUTTON_WIDTH, top);
|
||||
okButton.setLocation(noLeft, top);
|
||||
|
||||
yesButton.setSize( Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
noButton.setSize( Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
yesButton.setSize(Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
noButton.setSize(Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
cancelButton.setSize(Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
okButton.setSize( Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
editField.setSize( 2*Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
okButton.setSize(Preferences.BUTTON_WIDTH, Preferences.BUTTON_HEIGHT);
|
||||
|
||||
// edit field height is awkward, and very different between mac and pc,
|
||||
// so use at least the preferred height for now.
|
||||
int editWidth = 2*Preferences.BUTTON_WIDTH;
|
||||
int editHeight = editField.getPreferredSize().height;
|
||||
int editTop = (1 + sizeH - editHeight) / 2; // add 1 for ceil
|
||||
editField.setBounds(yesLeft - Preferences.BUTTON_WIDTH, editTop,
|
||||
editWidth, editHeight);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user