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

Decrease margins around the editor and project manager windows #40287

Closed
wants to merge 1 commit into from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 11, 2020

This increases the screen real estate available for Godot, especially at smaller window sizes.

Preview

Edit: This preview is outdated; there's now 1 pixel of margin on all sides (instead of 0).

Editor - Before

Before

Editor - After

image

Project manager - Before

Before

Project manager - After

After

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:editor usability labels Jul 11, 2020
@Calinou Calinou added this to the 4.0 milestone Jul 11, 2020
@Ansraer
Copy link
Contributor

Ansraer commented Jul 11, 2020

Here is a before and after slider: https://imgsli.com/MTg5MzM

@YeldhamDev
Copy link
Member

Honestly? I think it looks ugly. Having no margin borders doesn't really fit the current design of the editor.

@Calinou
Copy link
Member Author

Calinou commented Jul 11, 2020

@YeldhamDev It's normal for it to look out of place at first, but I think you get used to it after an hour of usage or so. It looked weird to me as well when I decreased it at first. We're so used to those 8-pixel margins we don't even pay attention to them anymore.

Also, keep in mind the real estate gains are significant on low-resolution displays like 1366x768 (which is common on budget laptops in use today). I've seen lots of people using Godot on such small displays over the years, and it looks like it will be the case for the foreseeable future. Let's make their experience as good as possible 🙂

@YeldhamDev
Copy link
Member

Also, keep in mind the real estate gains are significant on low-resolution displays like 1366x768 [...]

That happens to be the size of my monitor! 😉 And I think those margins make very little difference. I would personally wait for the new editor theme in 4.0 to do this kind of change, or at the very least, resize them down to 4 instead of completely removing them.

@aaronfranke
Copy link
Member

I like it much better with the margins, personally. I think this is mostly due to the fact that modern window managers don't have borders on the sides and bottom. I don't really buy the low-res screens argument, for one, I think it makes sense for Godot to target 1080p screens, and for another, 16 pixels is only a 2% height difference on a 1366x768 screen anyway.

The editor icons for tab options were resized from 6×16 to 16×16 so they don't touch the window edge. Incindentally, this also makes them easier to click.

This should be done regardless of whether or not we get rid of margins, sounds like a nice improvement :)

@YeldhamDev
Copy link
Member

@aaronfranke

[The icon resize] should be done regardless of whether or not we get rid of margins, sounds like a nice improvement :)

Already present in a PR of mine: #40289

@hilfazer
Copy link
Contributor

No! Let's leave efficient space usage to competing game engines. They enjoy having advantages over Godot.

Just kidding, great work.

@Calinou
Copy link
Member Author

Calinou commented Jul 12, 2020

@hilfazer That's another of my arguments for making margins as small as we can. None of the other tools in the open source creative world (Blender, Krita, …) have significant window margins like we do.

@groud
Copy link
Member

groud commented Jul 14, 2020

Hmm, I think this is the way we have to go, but as is, it kind of looks weird.
If we go for a more compact look we should also decrease the internal margins (at least the ones between the docks and the main area), otherwise it kind of creates an imbalanced look.

Also, the "3 dots button" at the top of the right dock needs to be slightly moved to the left.

@Calinou
Copy link
Member Author

Calinou commented Jul 14, 2020

If we go for a more compact look we should also decrease the internal margins (at least the ones between the docks and the main area), otherwise it kind of creates an imbalanced look.

I tried to do this but I didn't get it to work 🙁
This is why I'd prefer keeping that for a later PR.

Also, the "3 dots button" at the top of the right dock needs to be slightly moved to the left.

The icon was centered by #40289 already, but I'm not sure about moving it further to the left. It might look weird with the docks on the left.

@YeldhamDev
Copy link
Member

@Calinou The images should be updated.

@Calinou
Copy link
Member Author

Calinou commented Jul 14, 2020

@YeldhamDev I think it looks identical, I just rebased to use your icons instead of mine. I updated the editor screenshot anyway just in case.

@bruvzg
Copy link
Member

bruvzg commented Jul 14, 2020

On macOS (and probably some X11 display managers) few pixels in the corners are cut and blurred by window border, with the zero margins it can cut into controls.
Screenshot 2020-07-14 at 16 59 55

@Calinou
Copy link
Member Author

Calinou commented Jul 14, 2020

@bruvzg I think there's still enough internal margin to make this a non-issue. (Text and icons never really touch the window's edges with the margins removed.)

@akien-mga
Copy link
Member

Needs a rebase to fix CI.

I'm not 100% convinced by this change either. At least the provided screenshots don't show a significant increase in available usable space, and it's now less consistent not to have padding near the window borders while there is still significant padding between elements. But I'm not opposed to it either.

@name-here
Copy link

Only decreasing the outer margins seems like an odd choice, since, as mentioned by others, it makes the editor feel unbalanced. I think decreasing the internal margins would be an improvement, though, and decreasing the external margins might go well with that. For reference, since everything in Godot has a few pixels margin on all sides, its margins between usable spaces are around 4x as big as Blender's.

Screen Shot 2020-11-29 at 4 03 15 PM

Screen Shot 2020-11-29 at 4 03 53 PM

Personally, I think Godot could use some larger changes to it's layout, too. For example, why are 2D, 3D (GD)Script and AssetLib "special" workspaces, while the shader editors aren't? Why can't I have, say, the 2D and Script editors open at the same time, but I can have 2D and the shader editor open together? Why can't 2 scripts be open side by side? I like Godot's layout, but I wish it had the flexibility other tools have.

@aaronfranke
Copy link
Member

aaronfranke commented Nov 29, 2020

@name-here: For example, why are 2D, 3D (GD)Script and AssetLib "special" workspaces, while the shader editors aren't?

The idea is that usually you want to visually see the result of the shader while you're working on it, so you want to have either the 2D or 3D main screens visible. Maybe this can be changed for 4.x when we get the ability to pop out things to their own windows.

Why can't 2 scripts be open side by side?

Not much room usually since we have the rest of the editor too, but again maybe this will change with 4.x 🙂

This increases the screen real estate available for Godot, especially
at smaller window sizes.

The editor icons for tab options were resized from 6×16 to 16×16
so they don't touch the window edge. Incindentally, this also makes them
easier to click.
@Calinou
Copy link
Member Author

Calinou commented May 6, 2021

Rebased and tested again, it works successfully.

I changed the PR so there's now 1 pixel of margin on all sides. This prevents issues with some displays partially occluding the borders of controls or text due to their geometry.

@ghost ghost mentioned this pull request Feb 9, 2022
@Calinou Calinou closed this Jul 30, 2022
@Calinou Calinou added archived and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Jul 30, 2022
@Zireael07
Copy link
Contributor

Why close?

@Calinou
Copy link
Member Author

Calinou commented Jul 31, 2022

Why close?

There's no consensus on the implementation, as the margins look uneven between the window borders and the editor docks. We'd need SplitContainer to be able to have a virtual dragging area before we can reduce its margins, making the editor margins consistent.

@davthedev
Copy link
Contributor

Here is another approach I just worked on: expose the values as theme constants so that anyone can make a custom theme and decrease the margins through it.

godotengine/godot-proposals#6482
PR: #74767

We'd need SplitContainer to be able to have a virtual dragging area

This is now supported: #65355

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.