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

Spinboxes in the inspector have various visual and usability issues. #76620

Open
MewPurPur opened this issue Apr 30, 2023 · 9 comments
Open

Spinboxes in the inspector have various visual and usability issues. #76620

MewPurPur opened this issue Apr 30, 2023 · 9 comments

Comments

@MewPurPur
Copy link
Contributor

MewPurPur commented Apr 30, 2023

Godot version

Last tested on 4.2.1

System information

Ubuntu 22.04.1 LTS

Issue description

There are many small issues I've noticed; I could have made separate issues for them, but I think they are closely related enough that it would be spammy opening 10 separate bug reports.

  • Small boxes overextend when being edited.

image

  • When hovering a slider, I can't scroll up/down with a gesture on my laptop's trackpad (probably the same with a mouse).

image

  • The small arrow buttons no longer work when held (regression from 3.x I believe)
  • The arrows highlight when hovered stays if you move the mouse cursor outside of the spinbox.

image

  • When an integer property is at its min/max value, I still get "Set [property_name]" messages when using arrow keys or the spinner arrows.

image

  • After using the slider twice consecutively, Undo will jump two steps back.
  • Holding the spinbox and scrolling way out of range (i.e. way below the minimum value) results in having to scroll far in the other direction to even get back (above the minimum value).
  • The slider itself can go further than the line hint suggests on the right side.
  • They seem to be one pixel taller than buttons, which makes things jump around when they are unhidden.
Jumpy.mp4
  • Exponential spinboxes are bugged out when they include 0.

Steps to reproduce

If you've got a script you can quickly test most of the above with:

@export var A: Plane
@export_range(0.01, 20.0) var B = 10.0
@export_range(1, 50) var C = 10
@export_range(0, 0.5, 0.001, "exp") var D

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Apr 30, 2023

When hovering the rest of the spinbox, scrolling outside of it doesn't cause the indicator to disappear, which results in it lingering in weird places.

This is already being tracked in #42497.

@MewPurPur
Copy link
Contributor Author

I'm currently working on addressing some of these.

@MewPurPur
Copy link
Contributor Author

This is already being tracked in #42497

This specific bug can be fixed in EditorSpinSlider, but I think Viewport's logic of NOTIFICATION_MOUSE_EXIT is a more broad solution to these problems. #67791 might fix this, I am not sure.

@Sauermann
Copy link
Contributor

#67791 might fix this, I am not sure.

From a quick look I don't think so. I would rather suggest to use Viewport::update_mouse_cursor_state after scrolling with the mouse wheel.

@MewPurPur
Copy link
Contributor Author

@Sauermann Do you mean inside Viewport's _gui_input()? Or, like, everywhere this bug shows up?

@Sauermann
Copy link
Contributor

Viewports don't have a _gui_input function?!
I would rather say, in the _gui_input function of the respective Control node.

@MewPurPur
Copy link
Contributor Author

I meant _gui_input_event().

This is a bug universal for all controls. So Control.cpp's _gui_input() then?

@Sauermann
Copy link
Contributor

I was rather thinking about the ´_gui_input` of the Container, that interprets the mouse-wheel events for scrolling.

@MewPurPur
Copy link
Contributor Author

Updates.

When hovering the rest of the spinbox, scrolling outside of it doesn't cause the indicator to disappear, which results in it lingering in weird places.

This one was partially fixed, as the mouse_exited signal now works better (but not perfectly) with scrolling. I removed it from here, as it seems like more of a mouse_exited issue now.

UndoRedo sometimes goes a few steps back or stops working completely. (in the below video, it broke after the second undo).

Seems to be fixed, but there's another UndoRedo bug now, so I tweaked this.

Up and Down can behave in unexpected ways in floating-point spinboxes, same with any modifiers (i.e. Alt + Down). In the example below, the spinbox goes from 0.01 to 20.0

Seems to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants