Skip to content

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

Merged
Jugen merged 1 commit intoFXMisc:masterfrom
JFormDesigner:background-offset-fix
Dec 21, 2018
Merged

fix position of background, border and underline shapes in case that the line contains custom objects #793
Jugen merged 1 commit intoFXMisc:masterfrom
JFormDesigner:background-offset-fix

Conversation

@JFormDesigner
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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