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 SkinnableSprites in storyboards not autosizing to the textures #17238

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

frenzibyte
Copy link
Member

Noticed while adding test cases for #17237.

drawable = new SkinnableSprite(path)
{
RelativeSizeAxes = Axes.None,
AutoSizeAxes = Axes.Both,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is potentially a scary amount of autosize and one would hope that this is a simple automatic operation that SkinableSprite does when no size/relative size is provided by just taking the Sprite's size...

But I guess this is fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I'm not too sure about this myself, went with how it's done in other places like CatchComboDisplay and DrawableNote. The RelativeSizeAxes = Axes.Both specification in SkinnableDrawable would definitely have to be removed first to allow such automatic operation in place.

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't seem to have a noticeable effect in an edge case scenario I've got.

@smoogipoo smoogipoo merged commit 4037910 into ppy:master Mar 14, 2022
@frenzibyte frenzibyte deleted the storyboard-skinnable-sprite-size branch March 14, 2022 01:54
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.

None yet

2 participants