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

Make script list default wider, minimum narrower #96909

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Sep 12, 2024

Give more space to the script lists by default, but makes minimum smaller than it was. Unifies script editor and shader editor to use same values.

Before

Here's how default&minimum value is in current master on 1080 resolution 100% editor scale:
kuva
Script editor: 150 px
Shader editor: 200 px
Note how script editor's list is so narrow that even new_script.gd(*) doesn't fit.

After

Here's the new default:
kuva
Script editor: 200 px
Shader editor: 200 px
Note how code editor is still 115 chars wide, enough for usual code (exceeding 100 chars hampers readability anyway, no matter how big of a monitor).

Here's the new minimum:
kuva
Script editor: 100 px
Shader editor: 100 px
As GUI doesn't break (altough it gets cramped), we shouldn't limit the user from customizing layout for small/portrait monitors.

Related: #96865 would benefit from this.

Give more space to the script lists by default, but makes minimum smaller than it was. Unifies script editor and shader editor to use same values.
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

The rationale makes sense to me, and code looks good.

@aXu-AP
Copy link
Contributor Author

aXu-AP commented Sep 12, 2024

Is the mono check failing by some unrelated circumstance? Can I force it to rerun (amend something back and forth and force push the same commit?)

@tetrapod00
Copy link
Contributor

tetrapod00 commented Sep 12, 2024

Nice solution, I didn't know the default and the minimum could be split like that!

Edit: tested, and the script name truncation lacks ellipses at the minimum width, with default names (new_script.gd and new_shader.tres). Making it just one or two pixels wider fixes the problem. The ellipsis seems to appear at any width over 101 or 102. This is is probably an issue with the truncation code elsewhere, not specifically this PR.
Minimum, 100px:
godot windows editor x86_64_7vCl4TE4kr

Script editor at 101 or 102px, Shader editor at 100px:
godot windows editor x86_64_Xq9TrbOSmA

godot.windows.editor.x86_64_gaLLMuQTjM.mp4

I can't reproduce this truncation behavior in 4.4dev2 with a minimum width of 150. So, it's existing behavior that is exposed by this PR. If you can find a fix great, otherwise this can be a separate issue/PR

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 13, 2024
@akien-mga akien-mga merged commit 4ee5630 into godotengine:master Sep 17, 2024
21 checks passed
@akien-mga
Copy link
Member

Thanks!

@aXu-AP aXu-AP deleted the script-list-default-width branch September 17, 2024 09:32
@aXu-AP
Copy link
Contributor Author

aXu-AP commented Sep 17, 2024

@tetrapod00 Sorry I didn't notice your edit. Could you open a separate issue for this so it won't be forgotten? Also check if it's editor specific or ItemList in general.

@tetrapod00
Copy link
Contributor

@aXu-AP done in #97124

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.

5 participants