| Summary: | [StyledText] How to set caret size in variableHeight StyledText | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | Felipe Heidrich <eclipse.felipe> |
| Severity: | normal | ||
| Priority: | P3 | CC: | azerr, mistria |
| Version: | 3.2 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=532173 | ||
| Whiteboard: | |||
|
Description
Dani Megert
How does the default caret behave? Right now it uses getLineHeight(int offset). There is no support in TextLayout to retreive the ink rect of a characters. We plan to have a better support for it in the future. >Right now it uses getLineHeight(int offset).
This means the caret changes per line when I move up/down?
>This means the caret changes per line when I move up/down?
yes.
We either need the ability to specify auto-resizing of the caret (image) or a callback so that we can update the caret ourselves. Won't be looking at this until FH gets back. That's OK. Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info. This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate This is an issue for the AbstractTextEditor which is by default configured to use custom think caret according to the preference. In a multi-font scenario, I believe you should use a caret listener to dynamically change the size of your cursor according to its position. @Dani: Is this enough to close this bug? I'm closing this one. I believe a combination of a custom caret and a CaretListener can already cover the requirements of the initial request. The only missing piece would be to make method StyledText.getBoundsAtOffset more visible to allow to get good hint about the height at given offset, but if one has the font, using the font height can be enough. |