Skip to content

Commit 5993b15

Browse files
committed
Move to upper class.
1 parent 2e54a7c commit 5993b15

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

binding/src/main/java/ch/cyberduck/binding/ProxyController.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,16 @@ public boolean popoverShouldDetach(final NSPopover popover) {
421421
return true;
422422
}
423423
}
424+
425+
/**
426+
* Adjust frame of subview to match the parent view and attach with translating autoresizing mask into constraints
427+
*
428+
* @param parent Container View
429+
* @param subview Content View
430+
*/
431+
protected void addSubview(final NSView parent, final NSView subview) {
432+
subview.setTranslatesAutoresizingMaskIntoConstraints(true);
433+
subview.setFrame(parent.bounds());
434+
parent.addSubview(subview);
435+
}
424436
}

osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BookmarkContainerController.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ public void protocolSelectionChanged(final NSPopUpButton sender) {
8282
this.resize();
8383
}
8484

85-
private void addSubview(final NSView parent, final NSView subview) {
86-
subview.setTranslatesAutoresizingMaskIntoConstraints(true);
87-
subview.setFrame(parent.bounds());
88-
parent.addSubview(subview);
89-
}
90-
9185
public void setContainerContentView(final NSView view) {
9286
this.containerContentView = view;
9387
this.containerContentView.setTranslatesAutoresizingMaskIntoConstraints(true);

0 commit comments

Comments
 (0)