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

Make hyperlinks appear underlined only on mouse hover in RichTextLabel (and the editor help) #1474

Closed
setanarut opened this issue Sep 8, 2020 · 5 comments

Comments

@setanarut
Copy link

setanarut commented Sep 8, 2020

Describe the project you are working on:

Describe the problem or limitation you are having in your project:
Permanent underlines makes text difficult to read in editor help pages. I have trouble reading.
docgodot
capmett

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Make hyperlinks appear underlined only on mouse hover in editor help pages.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
for example docs.godotengine.org underlined links;
cap
underline

If this enhancement will not be used often, can it be worked around with a few lines of script?:
No
Is there a reason why this should be core and not an add-on in the asset library?:
Yes

@Calinou
Copy link
Member

Calinou commented Sep 8, 2020

For the record, this needs to be implemented in the RichTextLabel node. Note that RichTextLabel is currently being refactored, so implementing this right away may not be a good idea.

I think a mix of both ways is the best option accessibility-wise:

  • Use an underline with 50% opacity for non-hovered links.
  • Use an underline with 100% opacity for hovered links.

This way, you get visual feedback when hovering a link and you can determine whether something is a link without relying on color alone.

@setanarut
Copy link
Author

setanarut commented Sep 8, 2020

@Calinou
cap 2
cap 4

Link style of Google and Github (does not overlap);
cap 5

@Calinou
Copy link
Member

Calinou commented Sep 8, 2020

@hazarek That's an entirely different issue, which can be fixed by increasing the underline offset (underline_spacing custom constant). Note that in 4.0, the font file's underline offset will be added to this constant: godotengine/godot#31086

@setanarut
Copy link
Author

setanarut commented Sep 8, 2020

@hazarek That's an entirely different issue, which can be fixed by increasing the underline offset (underline_spacing custom constant). Note that in 4.0, the font file's underline offset will be added to this constant: godotengine/godot#31086

godotengine/godot#31086 these screenshots have same issue, should be a little lower and more line-height
cap 6

@setanarut
Copy link
Author

setanarut commented Sep 8, 2020

The problem is that it's a permanent underline, you're trying to rediscover gravity.

@Calinou Calinou changed the title Feature request: Make hyperlinks appear underlined only on mouse hover in editor help pages. Make hyperlinks appear underlined only on mouse hover in RichTextLabel (and the editor help) Sep 8, 2020
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

3 participants