Community
Participate
Working Groups
Build id: I20050627-1435 The UI convention on Windows is to use a lowered bevel border for all standard text-based items on the status bar of an application window, including the primary message label. Examples of well-known applications that follow this guideline include Windows Explorer, Internet Explorer, Firefox, Thunderbird, OpenOffice, WinZip and Notepad. Eclipse itself had also used to do this, but its appearance was changed for 3.0. There was a bug report (bug 63570) that requested keeping the old look for the R2.1 presentation but following the technical reasoning given in (the related) bug 63567 comment #2, it is likely that bug 63570 will eventually be resolved as WONTFIX. Even if this happens, standalone applications built with JFace+SWT should not be bound by decisions concerning the branding and appearance of the Eclipse SDK. Developers of such apps should be free to give their windows a more standards-compliant look if they choose to do so (without having to modify the JFace library itself). For this reason, this report requests that JFace provide a way of specifying that the message label of the standard status line control should have a lowered bevel border (SWT.SHADOW_IN) just like it had in 2.1. (The style of subsequent items added to the status bar can already be controlled by the programmer.) The problem is the following line in StatusLine.java: fMessageLabel = new CLabel(this, SWT.NONE);//SWT.SHADOW_IN); which in 2.1 read: fMessageLabel= new CLabel(this, SWT.SHADOW_IN); (Since StatusLine is package-private, subclassing is not an option.)
Workaround (terrible hack): --- import org.eclipse.jface.action.*; import org.eclipse.swt.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.widgets.*; import java.lang.reflect.*; public class MyStatusLineManager extends StatusLineManager { public Control createControl(Composite parent, int style) { Control ctrl = super.createControl(parent, style); try { Field fld = ctrl.getClass().getDeclaredField("fMessageLabel"); fld.setAccessible(true); CLabel oldLbl = (CLabel) fld.get(ctrl); if ((oldLbl.getStyle() & SWT.SHADOW_IN) == 0) { CLabel newLbl = new CLabel((Composite) ctrl, SWT.SHADOW_IN); newLbl.setForeground(oldLbl.getForeground()); newLbl.setText (oldLbl.getText()); newLbl.setImage (oldLbl.getImage()); try { fld.set(ctrl, newLbl); oldLbl.dispose(); } catch (Exception ex) { newLbl.dispose(); } } } catch (Exception ex) { } return ctrl; } }
There are no plans to work on this feature
(In reply to comment #2) > There are no plans to work on this feature > Could this be position be reconsidered? It seems like an easy and very useful thing to do. As it is, StatusLineManager is not usable for standalone JFace applications if one wants to have a standard look-and-feel under Windows.
If there is interest we can certainly reopen
It should have been mentioned in comment #0 that the bevel appearance is really only appropriate for the Windows Classic Theme. Under the XP Theme, status bars usually have a different look. This means that, as with bug 63570, the right thing would be to have a native status bar control which SWT would have to provide (bug 88837) and then make JFace (and the Eclipse SDK) use it.
I think this bug goes to Duong as part of contributions.
Assigning to component owner PW
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.