Skip to content

Commit

Permalink
Workaround bug where window becomes tiny
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Feb 5, 2019
1 parent 937af20 commit 9a52e0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/scijava/ui/swing/script/TextEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,12 @@ public void componentResized(final ComponentEvent e) {

setLocationRelativeTo(null); // center on screen

// HACK: Avoid weird macOS bug where window becomes tiny
// in bottom left corner if centered while maximized.
int y = getLocation().y - 11;
if (y < 0) y = 0;
setLocation(getLocation().x, y);

open(null);

final EditorPane editorPane = getEditorPane();
Expand Down

0 comments on commit 9a52e0b

Please sign in to comment.