godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.42k stars 20.24k forks source link

File overwrite confirmation dialogue can be taller than screen #76253

Closed Flynsarmy closed 1 year ago

Flynsarmy commented 1 year ago

Godot version

4.0.2.stable.official.7a0977ce2

System information

Windows 11, NVIDIA - NVIDIA GeForce RTX 3070 Ti

Issue description

I have two folders with identical files - about 50 files in total. If I drag all the files from folder A to B, I get a popup asking me to confirm the overwrite. Problem is the confirmation window lists all the file names to be overwritten and because there's so many, I can't actually see the confirm or cancel buttons at the bottom of the popup. The popup isn't scrollable and I can't resize it to make it smaller vertically.

image

Steps to reproduce

Have a folder 'foo' with 50 files in it. Doesn't matter what the files are. Empty resources will work. Duplicate the folder and name the duplicate 'bar'. In the FileSystem drag all the files in 'foo' into 'bar'.

Minimal reproduction project

N/A

dalexeev commented 1 year ago

AcceptDialog does not support label scrolling. Label doesn't support either (RichTextLabel does, but it can't be used instead of Label as it breaks compatibility). I'm not sure which solution is more correct:

  1. Add scrolling support to the Label.
  2. Add scrolling support to AcceptDialog (wrap label in ScrollContainer).
  3. Use custom dialog in FileSystemDock.

I doubt between the first and second option.

KoBeWi commented 1 year ago

We don't need any custom dialog. You can just add a ScrollContainer to a dialog and a Label, and use it instead of the dialog text. There's a chance this dialog already uses a "custom" label.

dalexeev commented 1 year ago

I think scrolling can be useful in user code as well (as a property of AcceptDialog or Label).