Where to adjust scroll speed?

Hi,

Scrolling in a scrollview is very fast on my mac. Could you please tell me where to adjust the scroll speed?

And does scaling factor in to the amount scrolled by chance?

do you mean mouse wheel speed? If so, i think its hardcoded: haxeui-core/ScrollView.hx at master · haxeui/haxeui-core · GitHub

It would be nice to know what is a good value for you here - it would be nice to actually calculate this (as the TODO indicates).

Open to suggestions :slight_smile:

Cheers,
Ian

Apologies for the delay, I got swept into some other project.
I meant the two finger touchpad scroll. (sounds like a kung-fu movie)
Like what you would use on a laptop.
But it turns out scrolling on a touchpad is handled by the mousewheel scroll function you pointed out. So that worked out well.

10 is about right in my case. Perhaps scaling should be factored in, my resolution is currently 834 x 417, Toolkit scale is at 1.5. But this works well on double the res as well. Though for very long pages, websites, you will want a speed increase.

Also, native apps like the finder/file explorer or webbrowsers support a kind of variable scrolling. The longer the finger stroke is, I guess the higher the mousewheel delta, the higher the scroll speed.

Please allow me to also squeeze in a question about something completely different;
In Themes and CSS, if I use default as my base, and buttons.cs has .button:active { border: 1px solid $accent-color; }. I now want to remove any layout change for the active state completely. How would I do that? Simply overriding with .button:active {} doesn’t work. Sorry, I’m not that familiar with css…

I do like the visualization of the active/focus elements though!

It be nice to come up with some type of (pretty simple) algo to calculate this - ill have a think.

Im not quite sure i follow - you are saying you want to remove the focus rect buttons? If thats the case:

.button:active {
    border: none;
}

should have worked - although - now i think about it, i wonder if that would remove the border entirely, if it does, you could just use the border from the “normal” state, something like:

.button:active {
    border: $normal-border-size solid $normal-border-color;
}

Or are you saying none of that works?

Cheers,
Ian

Nope, I’m just not very familiar with css. The last one works, thanks!
The first one indeed removes the border for normal states as well.

I’m not overly fond of copying settings though. Like for example when the parent theme changes border: 1px blah to border: 2px. Then the border would shrink when “active” as it copied the old border 1:px setting.

But that’s a nitpick. I was hoping setting something to empty would work :sweat_smile:

Thanks again!

you could always do something like

.button:active {
    border-color: $normal-border-color;
}

I think css has an “unset” attribute, though its not implemented in haxeui currently.

Alternatively you could also set the buttons to .allowFocus = false

Cheers,
Ian