Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 85899
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/EmptyTabFolder.java (+16 lines)
Lines 61-66 Link Here
61
     */
61
     */
62
    public Point computeSize(int widthHint, int heightHint) {
62
    public Point computeSize(int widthHint, int heightHint) {
63
        if (childControl != null) {
63
        if (childControl != null) {
64
        	// Fix for bug 85899 [Perspectives] [RCP]Standalone view does not divide space in 
65
        	//   proper ratio with reference when added to IPageLayout with showTitle parameter false
66
        	// If the childControl is a content proxy (a Composite with no children -- see PresentablePartFolder constructor),
67
        	// then computeSize returns 64x64, which is inappropriate.
68
        	// Note that this happens even if the Composite has a Layout that returns 0@0.
69
        	// Instead, use the sizes of the margins.  This is equivalent to calling control.computeSize(...)
70
        	// if the childControl returned 0@0 for its preferred size.
71
        	if (childControl instanceof Composite) {
72
        		Composite composite = (Composite) childControl;
73
        		if (composite.getChildren().length == 0) {
74
        			EnhancedFillLayout layout = (EnhancedFillLayout) control.getLayout();
75
        			int w = widthHint == SWT.DEFAULT ? layout.xmargin * 2 : widthHint;
76
        			int h = heightHint == SWT.DEFAULT ? layout.ymargin * 2 : heightHint;
77
        			return new Point(w, h);
78
        		}
79
        	}
64
            return childControl.computeSize(widthHint, heightHint);
80
            return childControl.computeSize(widthHint, heightHint);
65
        }
81
        }
66
        return new Point(0,0);
82
        return new Point(0,0);
(-)Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java (+1 lines)
Lines 108-113 Link Here
108
        
108
        
109
        //toolbarProxy = new ProxyControl(folder.getToolbarParent());
109
        //toolbarProxy = new ProxyControl(folder.getToolbarParent());
110
        
110
        
111
        // NOTE: if the shape of contentProxy changes, the fix for bug 85899 in EmptyTabFolder.computeSize may need adjustment.
111
        contentProxy = new Composite(folder.getContentParent(), SWT.NONE);
112
        contentProxy = new Composite(folder.getContentParent(), SWT.NONE);
112
        contentProxy.setVisible(false);
113
        contentProxy.setVisible(false);
113
        for (Control current = contentProxy; current != folder.getControl().getParent(); current = current.getParent()) {
114
        for (Control current = contentProxy; current != folder.getControl().getParent(); current = current.getParent()) {

Return to bug 85899