Skip to content

Commit

Permalink
Set minimum window size. Fix #8446.
Browse files Browse the repository at this point in the history
Former-commit-id: cd57caadb5f9d34f2746ae0323abceedc2df1e4e
  • Loading branch information
dkocher committed Dec 30, 2014
1 parent 8bcadaf commit 1d1ecf3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/ch/cyberduck/ui/cocoa/BookmarkController.java
Expand Up @@ -555,6 +555,7 @@ public void awakeFromNib() {

@Override
public void setWindow(NSWindow window) {
window.setContentMinSize(window.frame().size);
window.setContentMaxSize(new NSSize(600, window.frame().size.height.doubleValue()));
super.setWindow(window);
}
Expand Down
9 changes: 9 additions & 0 deletions source/ch/cyberduck/ui/cocoa/ConnectionController.java
Expand Up @@ -30,6 +30,7 @@
import ch.cyberduck.binding.application.NSPanel;
import ch.cyberduck.binding.application.NSPopUpButton;
import ch.cyberduck.binding.application.NSTextField;
import ch.cyberduck.binding.application.NSWindow;
import ch.cyberduck.binding.foundation.NSArray;
import ch.cyberduck.binding.foundation.NSAttributedString;
import ch.cyberduck.binding.foundation.NSNotification;
Expand All @@ -50,6 +51,7 @@
import org.rococoa.Foundation;
import org.rococoa.ID;
import org.rococoa.cocoa.foundation.NSInteger;
import org.rococoa.cocoa.foundation.NSSize;

/**
* @version $Id$
Expand Down Expand Up @@ -96,6 +98,13 @@ public void beginSheet() {
super.beginSheet();
}

@Override
public void setWindow(final NSWindow window) {
window.setContentMinSize(window.frame().size);
window.setContentMaxSize(new NSSize(600, window.frame().size.height.doubleValue()));
super.setWindow(window);
}

@Outlet
private NSPopUpButton protocolPopup;

Expand Down
1 change: 1 addition & 0 deletions source/ch/cyberduck/ui/cocoa/InfoController.java
Expand Up @@ -1336,6 +1336,7 @@ public void setIconImageView(NSImageView iconImageView) {
@Override
public void setWindow(final NSWindow window) {
window.setShowsResizeIndicator(true);
window.setContentMinSize(window.frame().size);
window.setContentMaxSize(new NSSize(600, window.frame().size.height.doubleValue()));
super.setWindow(window);
}
Expand Down
1 change: 1 addition & 0 deletions source/ch/cyberduck/ui/cocoa/PreferencesController.java
Expand Up @@ -263,6 +263,7 @@ public void invalidate() {
public void setWindow(NSWindow window) {
window.setExcludedFromWindowsMenu(true);
window.setFrameAutosaveName("Preferences");
window.setContentMinSize(window.frame().size);
window.setContentMaxSize(new NSSize(800, window.frame().size.height.doubleValue()));
super.setWindow(window);
}
Expand Down
2 changes: 1 addition & 1 deletion source/ch/cyberduck/ui/cocoa/WindowController.java
Expand Up @@ -99,7 +99,7 @@ public void removeListener(final WindowListener listener) {

public void setWindow(final NSWindow window) {
this.window = window;
this.window.setReleasedWhenClosed(!this.isSingleton());
window.setReleasedWhenClosed(!this.isSingleton());
window.setDelegate(this.id());
}

Expand Down

0 comments on commit 1d1ecf3

Please sign in to comment.