Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix position of background, border and underline shapes in case that the line contains custom objects #793

Merged
merged 1 commit into from
Dec 21, 2018

Conversation

JFormDesigner
Copy link
Contributor

If a line contains a custom object (e.g. image in RichText demo) and you apply background color to text after that image, then the background is painted one character to the left where it should be painted.

The problem is simply that the image is not considered when calculating the start position of the background color.

This PR fixes issue #638

@JFormDesigner
Copy link
Contributor Author

Steps to reproduce the issue:

  1. start RichTextDemo
  2. enter some text; e.g. "abc"
  3. click "insert image" in toolbar and insert some image (into same line as previous text)
  4. enter more text in the same line after the image; e.g. "123"
  5. select the "3"
  6. click "Text background" in toolbar and choose some color

Now the background color is shown at the "2", but it should at the "3"

@Jugen
Copy link
Collaborator

Jugen commented Dec 21, 2018

@JFormDesigner thanks for the PR

@Jugen Jugen merged commit 567e7e8 into FXMisc:master Dec 21, 2018
@JFormDesigner JFormDesigner deleted the background-offset-fix branch March 12, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants