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

Windows content is displayed wrong when embedded #66809

Closed
Sauermann opened this issue Oct 3, 2022 · 2 comments · Fixed by #80121
Closed

Windows content is displayed wrong when embedded #66809

Sauermann opened this issue Oct 3, 2022 · 2 comments · Fixed by #80121

Comments

@Sauermann
Copy link
Contributor

Sauermann commented Oct 3, 2022

Godot version

v4.0.beta.custom_build [d331b80] and v4.0.beta2.official

System information

Linux and Windows

Issue description

For the following aspect and mode combinations of a window the content is displayed wrong when the window is embedded.
aspect: CONTENT_SCALE_ASPECT_KEEP, CONTENT_SCALE_ASPECT_KEEP_WIDTH, CONTENT_SCALE_ASPECT_KEEP_HEIGHT.
mode: CONTENT_SCALE_MODE_CANVAS_ITEMS, CONTENT_SCALE_MODE_VIEWPORT

When embedded & When not embedded:
image image

I would expect, that the window content shows the same in both cases.

Since the non embedded version works the same in Linux and Windows and event position align with the non embedded version and the same display effect can be achieved by using CONTENT_SCALE_ASPECT_IGNORE, I assume, that this is a bug for embedded windows. So the embedded variant has wrong scaling and is missing the black bars at the top and bottom.

Steps to reproduce

Have a window w with:

	w.set_size(Vector2(100, 200))
	w.set_content_scale_aspect(Window.CONTENT_SCALE_ASPECT_KEEP)
	w.set_content_scale_mode(Window.CONTENT_SCALE_MODE_VIEWPORT)
	w.set_content_scale_size(Vector2(50, 50))

It displays wrong when embedded.

  1. Load and run the MRP
  2. Click on the button to switch between embedding and not embedding mode.

Minimal reproduction project

This is a MRP for the combination CONTENT_SCALE_ASPECT_KEEP and CONTENT_SCALE_MODE_VIEWPORT.
BugWindowDisplayBar.zip

@YuriSizov
Copy link
Contributor

Still valid as of 4.1 beta 3.

@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 22, 2023
@Koyper
Copy link
Contributor

Koyper commented Jul 13, 2023

This is related to #54030.

@AThousandShips AThousandShips modified the milestones: 4.2, 4.3 Nov 1, 2023
@KoBeWi KoBeWi removed this from the 4.3 milestone Aug 1, 2024
DeshyDan pushed a commit to DeshyDan/Top-Farmer-Code-Game that referenced this issue Sep 20, 2024
@Sauermann Sauermann moved this from Todo to In Progress in 4.x Priority Issues Oct 17, 2024
@Sauermann Sauermann added this to the 4.4 milestone Dec 19, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in 4.x Priority Issues Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants