Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319055

Summary: Toolbar item cut-off when using custom toolbar font
Product: [RT] Riena Reporter: Elias Volanakis <elias>
Component: Look And FeelAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.campo
Version: unspecified   
Target Milestone: 3.0.0.M2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Elias Volanakis CLA 2010-07-06 16:37:15 EDT
When enabling custom toolbar Fonts:

RienaDefaultTheme uncomment:
		lnf.putLnfResource(LnfKeyConstants.MENUBAR_FONT, getPrimaryFont());
		lnf.putLnfResource(LnfKeyConstants.TOOLBAR_FONT, getPrimaryFont());

and

public class FooTheme extends RienaDefaultTheme {

	protected FontLnfResource getPrimaryFont() {
		if (primaryFont == null) {
			final String name = "Arial"; //$NON-NLS-1$
			final int height = 10;
			primaryFont = new FontLnfResource(name, height, SWT.NORMAL);
		}
		return primaryFont;
	}	
}

the result is that the toolbar item is cut-off (see screenshot)
Comment 1 Elias Volanakis CLA 2010-07-06 16:40:31 EDT
Created attachment 173599 [details]
Screenshot
Comment 2 Elias Volanakis CLA 2010-07-08 21:17:54 EDT
Resolved in HEAD
Comment 3 Elias Volanakis CLA 2010-07-08 21:25:27 EDT
Note: apart from recomputing the size of all players as usual (see SWT Snippet150), one has to trigger a change of the text in the ToolItem (i.e. ti.setText("abc"), ti.setText(oldText)) to avoid a windows/SWT bug.