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

Slider grabbers don't disppear when scrolling in the inspector while hovered #42497

Open
ghost opened this issue Oct 2, 2020 · 6 comments
Open

Comments

@ghost
Copy link

ghost commented Oct 2, 2020

Godot version:

3.2.3 stable

OS/device including version:

Manjaro Linux

Issue description:

In project setting, the sliders knob stay visible, when close the window with escape key while mouse hover on any value input slider. The floating knob can be interact and change the value as in the gif.

bug

Similar to this issue #27258 happened when scroll while mouse hover on slider. If the slider at the bottom of the window, it can still happens as below

bug2

Steps to reproduce:

Explained in the issue description

Minimal reproduction project:

@Schweini07
Copy link

I can confirm this too on Manjaro Linux.

@trommlbomml
Copy link

I can confirm on Ubuntu 20.04, too.

@amoriqbal
Copy link
Contributor

amoriqbal commented Oct 3, 2020

I am on Linux Mint. (Ubuntu 20.04).
I can confirm the issue on Godot 3.2 (stable)
master ( #42518 ) has the issue of sliders remaining during scrolling. But the slider does not remain when the project settings window is closed.
Plus, I noticed the following behaviour on master when I tried to use the slider...
The mouse cursor vanishes when I click and drag the slider. The slider does not change its position, nor the value of the field changes. When I release the mouse, the cursor appears somewhere on the top left corner of the window.
godot-bug

@ojaohe-3
Copy link

Hello, we are a bunch of students that have tackled this issue. I think we have a solution for the artifact, when closing and a "fix " for the scroller. The issue was inside EditSpinSlider class that seem to not be updated properly, i could not really fix the scroll issue for that reason. The artifact fix was just to catch the notification_visual_change and hiding the grabber if it is still active. We are not experienced programmers so any input is valued.

EditorSpinSlider::_notification(int p_what) {
	//if grabber is visible and screen changes, hide grabber, if optimizations remove this notification fix this.
	if(p_what == NOTIFICATION_VISIBILITY_CHANGED &&  grabber->is_visible()){
			grabber->hide();
	}
//...
}

EditorSpinSlider:: _gui_input(){
//...
 else if (mb->get_button_index() == BUTTON_WHEEL_UP || mb->get_button_index() == BUTTON_WHEEL_DOWN) {
			//fix scolling issue, If the slider does not move when scrolling, this will make it hard to change the value
			if (grabber->is_visible()){
				mouse_over_spin = false; //the edit
				update();
			}
		}
}

i could make a pull request but I fear that i dont want to add more issues with this files then already are present.

@MagdielM
Copy link

MagdielM commented Oct 2, 2021

Hello, we are a bunch of students that have tackled this issue. I think we have a solution for the artifact, when closing and a "fix " for the scroller. The issue was inside EditSpinSlider class that seem to not be updated properly, i could not really fix the scroll issue for that reason. The artifact fix was just to catch the notification_visual_change and hiding the grabber if it is still active. We are not experienced programmers so any input is valued.

EditorSpinSlider::_notification(int p_what) {
	//if grabber is visible and screen changes, hide grabber, if optimizations remove this notification fix this.
	if(p_what == NOTIFICATION_VISIBILITY_CHANGED &&  grabber->is_visible()){
			grabber->hide();
	}
//...
}

EditorSpinSlider:: _gui_input(){
//...
 else if (mb->get_button_index() == BUTTON_WHEEL_UP || mb->get_button_index() == BUTTON_WHEEL_DOWN) {
			//fix scolling issue, If the slider does not move when scrolling, this will make it hard to change the value
			if (grabber->is_visible()){
				mouse_over_spin = false; //the edit
				update();
			}
		}
}

i could make a pull request but I fear that i dont want to add more issues with this files then already are present.

Not sure if you're still interested in this, but I'd encourage you to do so. Pull requests have to be reviewed by maintainers in order to be merged, and I'm sure they'd be happy to help you iron out any issues that may surge from the changes you've made. Eventually, once it's all polished and merged, you will have helped to make Godot better for everyone :)

@MewPurPur
Copy link
Contributor

MewPurPur commented May 31, 2023

Well, I investigated earlier, and while yes, the logic in EditorSpinSlider could be tweaked to prevent this, in 4.0.3 this appears to be an universal issue with NOTIFICATION_MOUSE_ENTER and NOTIFICATION_MOUSE_EXIT not updating at the right moment.

The first issue in the original post has been fixed. For the second one, "the right moment" is when a container updates its content based on scrolling. There are a lot more symptoms of this issue in the engine.

@Calinou Calinou changed the title Sliders knob visual bug in project setting Slider grabbers don't disppear when scrolling in the inspector while hovered Oct 15, 2023
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

8 participants