| Summary: | Label editor on connectors should be shorter | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] GMF-Runtime | Reporter: | Anthony Hunter <ahunter.eclipse> | ||||
| Component: | General | Assignee: | Anthony Hunter <ahunter.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aboyko | ||||
| Version: | 1.4.0 | ||||||
| Target Milestone: | 1.4.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 175016 [details]
Patch to fix the issue.
Looks good to me. (In reply to comment #2) > Looks good to me. Thanks Alex, committed to HEAD and R1_4_maintenance for 1.4.1. |
When creating a connector, direct label editor pops up. It is currently too long and can interfere with other actions. In addition, If you look at the text field, as soon as you type the first character "a", the text field shrinks back to the size of "a". The issue is in TextDirectEditManager, if (label.getText().length() <= 0) { // if there is no text, let's assume a default size // because it looks silly when the cell editor it tiny. rect.setSize(new Dimension(text.computeSize( SWT.DEFAULT, SWT.DEFAULT))); Since we are passing in SWT.DEFAULT, computeSize returns an OS dependent value, which is big (64 pixels on linux). Rather than default to SWT.DEFAULT, we should default of the side of "a".