Skip to content

Conversation

salianifo
Copy link
Contributor

Closes: #2443

Based on conversation with @zaknafean, I checked how this was done in Dialogic 1, and it uses get_viewport().get_visible_rect(), which according to my testing does respect the window stretch mode in Project Settings.

More detailed testing may be required, I only tested that the size matches expectations based on the stretch mode settings of disabled and canvas_items. When set to disabled the size reflects the actual window size, but on canvas_items the viewport size is returned instead, regardless of the window size. If I have time for further testing I will post any results as well.

@Jowan-Spooner Jowan-Spooner added the Approved This can be added, but is not on any roadmap yet label Oct 18, 2024
@Jowan-Spooner
Copy link
Member

This seems like a sensible change. Thank you very much for looking into this and making the PR 🎉!

@Jowan-Spooner Jowan-Spooner merged commit a85fb36 into dialogic-godot:main Oct 23, 2024
2 checks passed
@salianifo salianifo deleted the portrait-scaling branch October 23, 2024 17:57
LucaVazz pushed a commit to LucaVazz/dialogic that referenced this pull request Jun 29, 2025
…/scaled (dialogic-godot#2445)

Closes: dialogic-godot#2443

Based on conversation with zaknafean, I checked how this was done in Dialogic 1, and it uses get_viewport().get_visible_rect(), which according to my testing does respect the window stretch mode in Project Settings.

More detailed testing may be required, I only tested that the size matches expectations based on the stretch mode settings of disabled and canvas_items. When set to disabled the size reflects the actual window size, but on canvas_items the viewport size is returned instead, regardless of the window size. If I have time for further testing I will post any results as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved This can be added, but is not on any roadmap yet

Development

Successfully merging this pull request may close these issues.

Portraits don't respect the window stretch mode with percent sizing

2 participants