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

Increase the project manager's default window size #91889

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 12, 2024

This makes the project manager feel less cramped when many projects are imported, or when browsing templates in the asset library.

On displays smaller than 1152×800 (e.g. 1366×768), window height is automatically limited by DisplayServer when setting the window size.

This also tweaks splash screen size when starting the project manager to match the project manager's default window size, and allows the --resolution and --position CLI arguments to affect the project manager.

Lastly, this increases the minimum width slightly to prevent the UI from being cut off with the default theme.

Preview

Before After
Screenshot_20240513_000907 Screenshot_20240512_235619
Before After
Screenshot_20240513_000912 Screenshot_20240512_235626

@Calinou Calinou added this to the 4.x milestone May 12, 2024
@Calinou Calinou requested a review from a team as a code owner May 12, 2024 22:11
main/main.cpp Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the project-manager-tweak-default-window-size branch 2 times, most recently from 7236926 to c23000a Compare May 13, 2024 18:03
Comment on lines +2194 to +2468
if (!force_res && project_manager) {
// Ensure splash screen size matches the project manager window size
// (see `editor/project_manager.cpp` for defaults).
window_size.width = ProjectManager::DEFAULT_WINDOW_WIDTH;
window_size.height = ProjectManager::DEFAULT_WINDOW_HEIGHT;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are doing this anyway, can you have it initialize EDSCALE earlier and have the initial size take it into account?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in a separate PR as per @badsectoracula's comment (it's quite a bit more complex).

@badsectoracula
Copy link
Contributor

I did check this and it seems to work as expected and is more comfortable. Also checked with scaling, etc. It seems to work fine with both very large scaling and small DPI:

image

(though the main editor window isn't as accommodating at tiny resolutions)

I also checked what @alvinhochun suggested above about matching splash screen size for other scale factors than 1.0, it seems like EDSCALE would be set up way down the road so it'd either need yet another copy/paste of the scale setup logic (i've noticed at least a couple of those) or bringing the logic in a single place that is initialized very early (and perhaps updated later if needed, just not by copy/pasting the same code). Either case i think it'd be outside the scope of this PR.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Jan 10, 2025
This makes the project manager feel less cramped when many
projects are imported, or when browsing templates in the asset library.

On displays smaller than 1152x800 (e.g. 1366x768), window height is
automatically limited by DisplayServer when setting the window size.

This also tweaks splash screen size when starting the project manager
to match the project manager's default window size, and allows the
`--resolution` and `--position` CLI arguments to affect the project
manager.

Lastly, this increases the minimum width slightly to prevent the UI
from being cut off with the default theme.
@Calinou Calinou force-pushed the project-manager-tweak-default-window-size branch from c23000a to cc86322 Compare January 11, 2025 17:27
@akien-mga akien-mga merged commit a173b0e into godotengine:master Jan 11, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke
Copy link
Member

Pulled from master and immediately noticed that the project manager's default window size had shrunk significantly.

Screenshot 2025-01-12 at 9 01 27 AM

This is on macOS with 200% scaling, perhaps there is a * EDSCALE missing somewhere?

@Calinou Calinou deleted the project-manager-tweak-default-window-size branch January 22, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants