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 60768 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java (-7 / +16 lines)
Lines 345-351 Link Here
345
					}
345
					}
346
					perspectiveBar.update(true);
346
					perspectiveBar.update(true);
347
					setCoolItemSize(coolItem);
347
					setCoolItemSize(coolItem);
348
					
349
				}
348
				}
350
			}
349
			}
351
		};
350
		};
Lines 422-433 Link Here
422
			return;
421
			return;
423
422
424
		int rowHeight = toolbar.getItem(0).getBounds().height;
423
		int rowHeight = toolbar.getItem(0).getBounds().height;
425
		
426
		// This gets the height of the tallest item.
427
		for (int i = 1; i < perspectiveBar.getControl().getItemCount(); i++) {
428
			rowHeight = Math.max(rowHeight, perspectiveBar.getControl().getItem(i).getBounds().height);
429
		}
430
		
431
		Rectangle area = perspectiveCoolBar.getClientArea();
424
		Rectangle area = perspectiveCoolBar.getClientArea();
432
		int rows = rowHeight <= 0 ? 1 : (int)Math.max(1, Math.floor(area.height / rowHeight));
425
		int rows = rowHeight <= 0 ? 1 : (int)Math.max(1, Math.floor(area.height / rowHeight));
433
		if (rows == 1 || (toolbar.getStyle() & SWT.WRAP) == 0 || currentLocation == TOP_LEFT) {
426
		if (rows == 1 || (toolbar.getStyle() & SWT.WRAP) == 0 || currentLocation == TOP_LEFT) {
Lines 674-679 Link Here
674
		// make sure the selected item is visible
667
		// make sure the selected item is visible
675
		perspectiveBar.arrangeToolbar();
668
		perspectiveBar.arrangeToolbar();
676
		perspectiveBar.getControl().redraw();
669
		perspectiveBar.getControl().redraw();
670
	}
671
672
	/**
673
	 * Updates the height of the CBanner
674
	 */
675
	public void updateCBannerHeight() {
676
		if (topBar == null || perspectiveBar == null || perspectiveBar.getControl() == null)
677
			return;
678
		// This gets the height of the tallest tool item.
679
		int maxRowHeight = 0;
680
		ToolItem[] toolItems = perspectiveBar.getControl().getItems();
681
		for (int i = 0; i < toolItems.length; i++) {
682
			maxRowHeight = Math.max(maxRowHeight, toolItems[i].getBounds().height);
683
		}
684
		// This sets the CBanner's minimum height to support large fonts
685
		topBar.setMinRightHeight(maxRowHeight);
677
	}
686
	}
678
687
679
}
688
}
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java (-2 / +4 lines)
Lines 513-520 Link Here
513
		int result = super.open();
513
		int result = super.open();
514
		getWorkbenchImpl().fireWindowOpened(this);
514
		getWorkbenchImpl().fireWindowOpened(this);
515
		getAdvisor().postWindowOpen(getWindowConfigurer());
515
		getAdvisor().postWindowOpen(getWindowConfigurer());
516
		 if (perspectiveSwitcher != null)
516
		 if (perspectiveSwitcher != null) {
517
	        perspectiveSwitcher.updatePerspectiveBar();
517
		 	perspectiveSwitcher.updateCBannerHeight();
518
		 	perspectiveSwitcher.updatePerspectiveBar();
519
		 }
518
		return result;
520
		return result;
519
	}
521
	}
520
522

Return to bug 60768