Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319055 - Toolbar item cut-off when using custom toolbar font
Summary: Toolbar item cut-off when using custom toolbar font
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: Look And Feel (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.0.0.M2   Edit
Assignee: Elias Volanakis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-06 16:37 EDT by Elias Volanakis CLA
Modified: 2010-10-29 06:16 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot (7.22 KB, image/png)
2010-07-06 16:40 EDT, Elias Volanakis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.