godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.1k stars 69 forks source link

Allow mouse pointer to toggle on/off Distraction Free Mode (Dock Hiding) when pushed off the left or right screen edges. #10149

Open wyattbiker opened 1 month ago

wyattbiker commented 1 month ago

Describe the project you are working on

Any.

Describe the problem or limitation you are having in your project

As we know Distraction Free Mode (DFM) hides the left and right docks to show more of the editor work screen. This is true for both the Scene and Code Editors. It is a very nice feature but rather cumbersome in the sense that one has to keep clicking the tiny button on/off and looking for it.

I find the current use of the DFM button (see red circle in screen shot), a distraction (pun intended?) and makes me pause to look for it. Sometimes I want it toggled for few seconds and back.

I would like to propose making DFM easier to toggle by allowing the mouse pointer to turn it on / off when pushing it off the left or right of the screen edge.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

How it would work is as follows:

A) DFM will toggle accordingly when the mouse is pushed off screen left or right, after a certain amount of time, perhaps 1 second or even less.

B) Must be in full screen mode. Otherwise mouse screen edge should be ignored.

C) An Editor setting to disable the feature and also set time delay is needed.

D) An Editor setting to allow the current DFM button to immediately switch mode when hovered over. This would be especially better when windowed editing. At least saves the click.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Attached are screen shots of DFM off and DFM on as reference:

Screenshot_20240707_204103 Screenshot_20240707_204221

If this enhancement will not be used often, can it be worked around with a few lines of script?

not possible

Is there a reason why this should be core and not an add-on in the asset library?

Must be core. Editor setting can disable.

Caveats:

Anyone who has OS screen edge mouse events may or may not be able to use. E.g. OS task manager and menu pop ups on the vertical edge of screen.

kleonc commented 1 month ago

It is a very nice feature but rather cumbersome in the sense that one has to keep clicking the tiny button on/off and looking for it.

Note you can set a custom shortcut for it in the editor settings (or use the default Ctrl+Shift+F11 or Meta+Shift+D): Godot_v4 3-beta2_win64_xQHOTKAttZ

I recommend doing so, I'm using a custom shortcut for this since forever, way less cumbersome than clicking the button with a mouse (and to me it seems less cumbersome than what's proposed in here).

Calinou commented 1 month ago

It seems strange to me to have an autohiding behavior that would affect both docks based on the mouse cursor position relative to one of the docks. I feel this would need https://github.com/godotengine/godot-proposals/issues/1441 to be implemented first to make more sense.

wyattbiker commented 1 month ago

Already so many shortcuts to start with, and anything with 2 + fingers is extra over keyboard motion. CTRL+SHIFT+F11 or some other weird combination?

It seems strange to me to have an auto-hiding behavior that would affect both docks based on the mouse cursor position relative to one of the docks. I feel this would need #1441 to be implemented first to make more sense.

Maybe for some but ok. Could be a settings option to only hide/unhide one dock. But either way it is much better than having to hunt for the button or shortcuts.