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

Lists number/bullet inherit style of following text #437

Closed
polarathene opened this issue Dec 26, 2016 · 7 comments
Closed

Lists number/bullet inherit style of following text #437

polarathene opened this issue Dec 26, 2016 · 7 comments

Comments

@polarathene
Copy link

See how some list items start with links or inline block and this affects the style of the lists number/bullet? This should not be the case. List number/bullet should be consistent in style with the rest at it's level(I have seen some styles have alternating bullet styles per list level).

bug_qownnotes_list_style

@pbek
Copy link
Owner

pbek commented Dec 27, 2016

Can you please explain in more detail and step by step what you did, what happened and what you expected.

And it seems you are using a dark highlighting schema in the non-dark mode, that looks a bit "strange" :). You should upgrade to the latest version of QON, where the background color will be adapted.

@polarathene
Copy link
Author

polarathene commented Dec 27, 2016

@pbek I already have, I just used the screenshot from previous issue as it shows this bug as well. I wrote the issue late at night, I forgot to point out that it was an issue with preview pane(right side) rendering.

Notice how the numbered list starts with orange number like the first bit of text(a link), then look down just above Software requirements heading, you can see the last bullet point is smaller in style/size than the other bullet points, most likely because of style/font change on the first text to the right of it "Optional".

Here is an example you can try yourself for step by step:

1. [I am a link](http://www.google.com). I am regular black text.
1.  Just regular styled text as expected.
1. `Inline code block`. Looks like previous style pushed the number left/up.
1. Regular text back to normal. I used all 1 to prove number list is affected.

- [I am a link](http://www.google.com). I am regular black text.
-  Just regular styled text as expected.
- `Inline code block`. Looks like previous style affected the bullet point size/alignment.
-  Just regular styled text as expected.

Github renders like this:

  1. I am a link. I am regular black text.
  2. Just regular styled text as expected.
  3. Inline code block. Looks like previous style pushed the number left/up.
  4. Regular text back to normal. I used all 1 to prove number list is affected.
  • I am a link. I am regular black text.
  • Just regular styled text as expected.
  • Inline code block. Looks like previous style affected the bullet point size/alignment.
  • Just regular styled text as expected.

And here is screenshot of example in QOwnNotes:

bug_qownnotes_list_style
bug_qownnotes_list_style2

Editor theme have nothing to do with it.

@pbek
Copy link
Owner

pbek commented Dec 28, 2016

Ah, now I know what you are talking about. Unfortunately that's a known limitation of the QTextEdit widget and I haven't found a way around this. The bullet styles are inherited from the styling of the first character in the list item. It's on my list to check if we ever use a fully fledged browser for the preview (which also has its disadvantages and is currently not possible).

@pbek pbek closed this as completed Dec 28, 2016
@polarathene
Copy link
Author

@pbek Would it be possible to workaround with an invisible character or space with regular text style applied prior to intended text on a list item? Has the bug been reported upstream to Qt?(assuming that's the relevant project)

@pbek
Copy link
Owner

pbek commented Dec 28, 2016

As far as I remember adding an "invisible" character didn't work back then... But you can play around with it in a script like https://github.com/pbek/QOwnNotes/blob/develop/doc/scripting/preview-styling.qml...

I can't remember if there was an upstream Qt bug report...

@polarathene
Copy link
Author

@pbek I had no luck with an invisible character work around either.

I was able to find a related bug report for Qt but it was specific to the bold style. I've created a new issue here if you'd like to chime in or vote it up :) It's not been fixed in over 6 years, hopefully it'll get some attention.

Anybody else that comes across this issue and would like to see it fixed can vote on the linked issue :)

@pbek
Copy link
Owner

pbek commented Dec 29, 2016

Thank you for testing and creating an issue. I voted for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants