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

V Scroll Speed does not work #56317

Open
Torguen opened this issue Dec 29, 2021 · 6 comments
Open

V Scroll Speed does not work #56317

Torguen opened this issue Dec 29, 2021 · 6 comments

Comments

@Torguen
Copy link

Torguen commented Dec 29, 2021

Godot version

3.4.2 stable

System information

w10 64

Issue description

I want a faster vertical scroll when I use the mouse wheel but "V Scroll speed" has no effect on that.
Nothing just happens even if you put a value of 240.
Captura

Steps to reproduce

just set a value in the option and navigate vertically through the code using the middle wheel of the mouse (turning the wheel) to check if it works or not.
It will not work

Minimal reproduction project

...

@KoBeWi
Copy link
Member

KoBeWi commented Dec 30, 2021

Looks like some TextEdit bug. When you change the v_scroll_speed property it doesn't seem to have any effect, regardless of smoothing. Also valid in 9f05867

@jmb462
Copy link
Contributor

jmb462 commented Feb 12, 2022

I've investigated on this issue and I think there isn't any issue (or I can't reproduce it neither in master nor in 3.4.2 stable).

The "scrolling speed" could be missleading.

When you're scrolling with mouse wheel, each step (notch?) of the mouse wheel will always move 3 lines up or down.

But, when you spam the wheel, the destination scroll value will be reach less or more rapidely according to "V Scroll Speed" editor property.

In this gif, I scroll the mouse wheel as fast as I can and you can see the difference :
fixed

So I think this issue should be closed (Seems to be a mistake about what this setting is supposed to do)
However, while investating this one, i've found some issue about this property : #58009

@Torguen
Copy link
Author

Torguen commented Feb 12, 2022

Don't close this for now, let me check it later please.

@Torguen
Copy link
Author

Torguen commented Feb 13, 2022

I explain.
I want to navigate through code faster using the mouse wheel.
Changing the option of the scroll lines that are made by pressing the mouse wheel from windows has no effect in the script editor.

Captura2

Ok, I change the "V Scroll speed" option thinking that this option refers to the central mouse wheel and the lines that scroll at each "notch" that the wheel turns.
It also has no effect.
The scrolling speed in the editor using the middle mouse wheel is always the same.
So what does the "V scroll speed" option mean?

Captura3

@jmb462
Copy link
Contributor

jmb462 commented Feb 13, 2022

OK, so the problem is not v_scroll_speed which isn't meant to change that.

godot/scene/gui/text_edit.cpp

Lines 1546 to 1555 in 48ed040

if (mb->get_button_index() == MouseButton::WHEEL_UP && !mb->is_command_pressed()) {
if (mb->is_shift_pressed()) {
h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
} else if (mb->is_alt_pressed()) {
// Scroll 5 times as fast as normal (like in Visual Studio Code).
_scroll_up(15 * mb->get_factor());
} else if (v_scroll->is_visible()) {
// Scroll 3 lines.
_scroll_up(3 * mb->get_factor());
}

You can get 15 lines by pressing ALT while scrolling.
3 lines default is hardcoded.

get_factor() is equal to 1 when turning 1 wheel step and augment when spamming the mouse wheel.

Maybe you could open a proposal to add a wheel mouse sensitivity factor as a setting and check for community interest.

@Calinou
Copy link
Member

Calinou commented Feb 13, 2022

Maybe you could open a proposal to add a wheel mouse sensitivity factor as a setting and check for community interest.

I definitely agree with adding such a setting, and I think it should affect all scrollable controls (not just TextEdit). The Alt modifier could also be made to work in all scrollable controls. I implemented it in TextEdit only as a stopgap, but it could be useful to have for large scene trees or long Output logs too.

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

4 participants