Skip to content

Popup subwindows created by MenuButtons not scaling relative to parent window #69749

@MACMAN2003

Description

@MACMAN2003

Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

4.0.beta3.mono

System information

Windows 10, Vulkan, Nvidia RTX 2080 TI

Issue description

When "Embed Subwindows" is set to false in the project settings, popup windows made by MenuButtons don't get placed/scaled relative to the "parent" window

unscaled parent window

unscaled parent window^

the popup window is scaled correctly when the parent window is not scaled at all.

scaled parent window

scaled parent window^

and when maximized, the popup window stays the same size (and even in the same place) making it hard to read on high-DPI devices

This is easily fixed by setting "Embed Subwindows" to true in the project settings, but i want to also have a file dialog window that's not embedded

Steps to reproduce

  • make a new project
  • go to the project settings
  • set the window width and height to 1920 and 1080
  • set embed subwindows to false
  • set the stretch mode to "viewport" or "canvas items"
  • make a new scene
  • make a Control node
  • make a Container node as a child of the control node
  • make a MenuButton node as a child of the container node
  • add an item to the menuButton node
  • run the project
  • resize the window
  • click on the MenuButton
    or
  • open the reproduction project
  • run the project
  • resize the window
  • click on the "click for menu" button

Minimal reproduction project

subwindows.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions