| Summary: | [Viewers] [JFace] Setting font in StyledString does not work | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Flannan Lo <flannanl> | ||||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Hitesh <hsoliwal> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | eclipse.felipe | ||||||||
| Version: | 3.4.2 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
JFace bug ? Works just fine on my Win-Xp system. Can you please paste a snippet that I could use to test the bug ? Created attachment 178329 [details]
Code snippet that shows the problem.
This is a label provider I use for my tree viewer. I simplified it so that it will shows a label "Hello there!" in my tree viewer. The word "there" should have a yellow background color and bold font. However, in my tree viewer, I only see the yellow background. The text is not bold.
Created attachment 178330 [details]
A screen capture that shows the problem.
Created attachment 178334 [details] ScreenShot on my system ;) > Build Identifier: M20090211-1700 > Above is an old build; please try this on the newer builds(I have been testing with 3.6 without any luck). The bug might have existed in 3.4 build and may have got fixed as a side-effect of another bug-fix. Not reproducible in later Eclipse version. |
Build Identifier: M20090211-1700 I have a label provider which make use of StyledString. I have a custom org.eclipse.jface.viewers.StylerString.Styler to set the style in my StyledString. In the applyStyles method, I did something like: Font systemFont = Display.getDefault().getSystemFont(); FontData fd = systemFont.getFontData()[0]; fd.setStyle(SWT.BOLD); textStyle.font = = new Font(Display.getDefault(), fd); However, in my tree viewer, I don't see the bold font applied to my label. Reproducible: Always