Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scene.contentsSize underestimates vertical size with wrapped (text?) elements #1307

@rcoreilly

Description

@rcoreilly

Describe the bug

using the new ResizeToContents method from #1306 the window was likely mis-sized because of the wrapped text -- if you start from other narrower sizes you get different resulting sizes. This is also a function of whether the buttons are wrapped in the flex layout. It is tricky because the starting size you give it is the whole screen, so it doesn't wrap that. But the contentsSize method operating on a current scene will probably use the current wrapping, so there can be mismatches. Need further investigation.

You can pass a suitable extra size amount, as we now do, to make it work in any given situation, but it would be good to fix the general issue at some point.

How to reproduce

run examples/demo and go to Widgets/Dialogs and click on Resize to contents button.

Example code

No response

Relevant output

No response

Platform

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlyconfirmedThis bug has been confirmed

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions