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

Draw a "background" line behind the dashed line in TextureRegion editor #45164

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jan 13, 2021

This makes the dashed line visible on any background and also scales the line width on hiDPI displays.

This closes godotengine/godot-proposals#2113.

Note: I couldn't test this since I always forget how to display the dashed line in the TextureRegion editor.

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:editor usability labels Jan 13, 2021
@Calinou Calinou added this to the 4.0 milestone Jan 13, 2021
This makes the dashed line visible on any background.
@Calinou Calinou force-pushed the texture-region-editor-line-background branch from 15848af to 656aba1 Compare January 13, 2021 16:22
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears when you use ninepatches
image

Looks ok, although I'm not a fan of one-argument lines. If anything I'd do

edit_draw->draw_line(from, from + line,
	EditorNode::get_singleton()->get_theme_base()->get_theme_color("mono_color", "Editor"),
	Math::round(2 * EDSCALE));

But your formatting is ok too I guess.

@akien-mga akien-mga merged commit d1f2644 into godotengine:master Jan 15, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.2.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 15, 2021
@Calinou Calinou deleted the texture-region-editor-line-background branch March 31, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the Lines in the TextureRegion Dock contrast the Texture's Color
3 participants