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

Opening another window won't use canvas items. #87299

Open
RoopeAnkka opened this issue Jan 17, 2024 · 5 comments
Open

Opening another window won't use canvas items. #87299

RoopeAnkka opened this issue Jan 17, 2024 · 5 comments

Comments

@RoopeAnkka
Copy link

Tested versions

4.2

System information

Windows 11

Issue description

When I open second window (Window-node) it won't use the canvas_items and scale the nodes inside.

Steps to reproduce

Make window with sprite and try to use canva_items inside window node.

Minimal reproduction project (MRP)

testing (2).zip

@AThousandShips
Copy link
Member

AThousandShips commented Jan 17, 2024

You're not setting it, you need to do:

_scene.content_scale_mode = CONTENT_SCALE_MODE_CANVAS_ITEMS

and

print(content_scale_mode)

It's a constant, not a property

This is not a bug (there's even a warning, though it's hard to notice: Standalone expression (the line has no effect).)

For support questions and help please first turn to the other community channels, this is for bug reporting, not a help desk. Please use other channels first to see if this is a bug or user error.

@RoopeAnkka
Copy link
Author

You're not setting it, you need to do:

_scene.content_scale_mode = CONTENT_SCALE_MODE_CANVAS_ITEMS

and

print(content_scale_mode)

It's a constant, not a property

This is not a bug (there's even a warning, though it's hard to notice: Standalone expression (the line has no effect).)

For support questions and help please first turn to the other community channels, this is for bug reporting, not a help desk. Please use other channels first to see if this is a bug or user error.

I also set it here and it does not work. The content of the window will not scale if I resize the window.

image

@AThousandShips
Copy link
Member

Can you provide a working MRP without the bugs? Also please do not include the .godot folder

@RoopeAnkka
Copy link
Author

RoopeAnkka commented Jan 17, 2024

test.zip

Here. If you have a solution I'm happy to hear it.

@rsubtil
Copy link
Contributor

rsubtil commented Jan 18, 2024

Duplicate of #54030?

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