Community
Participate
Working Groups
Build Identifier: 20100917-0705 When using custom fonts in RAP sometimes labels have cut off the last part of the text on the label. The view has to be restored to fix the display problem. Reproducible: Always Steps to Reproduce: 1. Use a custom stylesheet with an alternating font.
Stefan, could you provide a self-running snippet to reproduce it? Is this happen only first time (after server startup) when you start the application? If reloading the application fixes the problem, it's probably a TextSizeDetermination issue. Thanks.
Sorry I couldn't provide a code example. But I attached a screenshot. After reopen the dialog the label fits.
Created attachment 191302 [details] Screenshot
Stefan, I understand what is the problem, but without a code snippet to reproduce the issue it's impossible to trace it down and fix it.
Stefan, does this happen with a JFace Dialog? If so, you could try to overwrite the Dialog#configureShell() method as follows: protected void configureShell( Shell shell ) { super.configureShell( shell ); // Workaround for RWT Text Size Determination shell.addControlListener( new ControlAdapter() { public void controlResized( ControlEvent e ) { initializeBounds(); } } ); } Does this fix the problem?
This is the part from our my custom theme css: * { font: 10px "Verdana", "Lucida Sans", "Arial", "Helvetica", "sans-serif"; } The problem happens each time I use the element.setText("") - method in handlers. The handlers are extending the org.eclipse.core.commands.AbstractHandler and implementing the org.eclipse.ui.commands.IElementUpdater. The setText("") - method is used in the updateElement - method. This is used for the translation of the buttons: public void updateElement(final UIElement element, @SuppressWarnings("rawtypes") final Map parameters) { element.setText(""); element.setIcon(); } I need your help to provide a self running code example. Can someone explain it for me. Thx Stefan R.
> I need your help to provide a self running code example. Can someone explain it > for me. Stefan, it is difficult and time consuming to reproduce problems without knowing exactly what to look for. Therefore it would be helpful if you could extract a demo bundle that reproduces the problem. Add this bundle afterwards as attachment to this bug. You may have a look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=344822 as an example. In your case I would suggest the bundle would start a simple workbench containing a custom stylesheet, the mentioned Command-/Handler-/ElementUpdater- combination and what ever is needed to reproduce your problem. After that we are able to download this bundle, include it in our workspace, launch it and debug the problem.
Stefan, do you have an update (test snippet/project) on this issue?
Created attachment 211726 [details] Demo Application The only thing I can reproduce is the toolbar button in our views. It has the text "Unlink View" and the "w" is cut off a little bit. Our theme.css is stored in the resources folder. Sorry for the long time to upload the snippet. Greetings Stefan R.
(In reply to comment #9) > The only thing I can reproduce is the toolbar button in our views. It has the > text "Unlink View" and the "w" is cut off a little bit. I can reproduce it too with RAP 1.5M5. Thanks for the snippet.
Still valid with 2.0M2.
I can't reproduce it anymore with RAP 3.0M3. Probably it's fixed meanwhile. Please reopen if the issue persists.