Giter Club home page Giter Club logo

Comments (2)

etacarinaea avatar etacarinaea commented on August 26, 2024

if stretch mode (display/window/stretch/mode) is set to viewport, the root window (get_tree().root) will not emit its size_changed signal.

This only happens when display/window/stretch/mode is set to viewport and display/window/stretch/aspect is set to ignore or keep (but I assume this also happens with keep_width/keep_height when the height/width isn't being changed). When aspect is set to expand, the size_changed signal will be emitted when the window is resized through the window manager.

only happens to the root window

This does also happen for child windows with the same attributes, although both components of the content_scale_size vector need to be non-zero, otherwise the viewport will be resized. Also, setting content_scale_size on a window will emit the size_changed signal, even with the attributes set as above.

I'm wondering if this is technically a bug or if it's actually "working as intended" since the stretch mode tooltip mentions that "the size of the root Viewport is set precisely to the base size" and "finally, this viewport is scaled to fit the screen", so I guess the base size (I assume that means content_scale_size) of the viewport never really changes when the aspect ratio is kept. But the size attribute changes, so it would make sense that the size_changed signal is emitted, unless it really is only supposed to emit when the base size is changed, but then there should be two signals imo, size_changed for the size and content_scale_size_changed for the content_scale_size.

EDIT: I just saw that this is probably a duplicate of #79336

from godot.

Calinou avatar Calinou commented on August 26, 2024

Thanks for the report! Consolidating in godotengine/godot-proposals#8788, as this is intended behavior (the viewport size does not actually change when resizing the window). Therefore, implementing a notification for this is feature proposal territory.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.