smooth-scroller icon indicating copy to clipboard operation
smooth-scroller copied to clipboard

Increase Framerate to reduce flicker ?

Open daslicht opened this issue 9 years ago • 12 comments

Hi, when scrolling it looks very un-smooth compared to lets say Atom or SublimeText3.

Is there maybe a way to increase the frame rate so that it looks more smooth ?

~Marc

daslicht avatar Mar 25 '16 19:03 daslicht

Yea, I'll add an option. If it gets too high, bad things happen :smile:

I may not get to it until next week.

opus1269 avatar Mar 25 '16 19:03 opus1269

sounds awesome ! :dancer:

daslicht avatar Mar 26 '16 10:03 daslicht

Any progress on this one? Moderate framerate is my only "problem" with this plugin :smile:

Ideally we should aim for 60fps to make it buttersmooth, but even 30-40fps would be a nice improvement.

Kurre avatar May 26 '16 10:05 Kurre

its really a shame thats not built in , heck any other free 'editor' is smoother

daslicht avatar May 26 '16 11:05 daslicht

I just downloaded the repo and modified the framerate parameter from 20 to 60, and then I built the plugin. After installing the newly-built plugin, the smoothness increased significantly (or as smooth as hell). I wonder why the author still haven't added the option to change the framerate. Maybe some side effects or something?

File changed:

https://github.com/opus1269/smooth-scroller/blob/master/src/com/weebly/opus1269/smoothscroller/SmoothScrollerMouseWheelListener.java#L41

Change FRAMES_PER_SECOND to whatever framerate value you want. I tried 60 withou noticing any bugs yet.

arshcaria avatar Dec 15 '16 14:12 arshcaria

@arshcaria can you describe the steps you made to build + install?

julienvincent avatar Dec 15 '16 14:12 julienvincent

You need IntelliJ Idea installed to build plugins.

I had ZERO Intellij plugin devel experience before. And I can't figure out how to import the plugin project. But no problem, I just created a new plugin project and put this repo's code to that plugin project. Follow this guide to create / debug / deploy a plugin project: http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html

Then you can build (ctrl+f9) and run (shift + f10) this project. If it works like what you want, you can then deploy the plugin JAR by clicking Build | Prepare Plugin Module for Deployment

Then you get a newly-generated JAR file in you project folder. Install this JAR to your Intellij Idea or Android Studio IDE.

Done.

arshcaria avatar Dec 15 '16 14:12 arshcaria

An initial version of built in smooth scrolling is available. I haven't tried it yet, but hopefully this plugin will be unnecessary soon.

https://youtrack.jetbrains.com/issue/IDEA-91965

opus1269 avatar Dec 15 '16 18:12 opus1269

Some time ago I did the same thing and it improved the experience a lot.

But now JetBrains is bringing us native smooth scrolling (eventually, hopefully we don't need to wait for long time).

It's already available in IDEA master: https://youtrack.jetbrains.com/issue/IDEA-91965#comment=27-1800635

🙋

edit: ok, got ninja'd 🙂

Kurre avatar Dec 15 '16 18:12 Kurre

That's great news. This plugin has some conflicts with Idea's breadcrumb feature. When clicking on the parent breadcrumb, the editor's view won't properly change to the parent. The higher framerate you set, the smaller the movement is.

I just saw some fresh commits on native smooth scrolling in Idea. Wish it could be stable. https://github.com/JetBrains/intellij-community/commit/580a514b18de0d212c5f6344ac10523e6fb907c8

arshcaria avatar Dec 15 '16 18:12 arshcaria

True Smooth Scrolling feature seems to be a part of 2017.1 EAP builds (PHPStorm for me).

You need to add idea.true.smooth.scrolling=true to ~/.PhpStorm2107.1/idea.properties and enable Smooth scrolling in Settings - Editor - General to enable this True Smooth Scrolling feature. ...or at least it doesn't work without both options being set, so I assume it's really this aforementioned feature :slightly_smiling_face:

It doesn't feel perfect yet, but isn't bad either.

Kurre avatar Dec 23 '16 22:12 Kurre

We with non high precision mouses are still in need of this :/ not sure if Jetbrain will correct it.

RomuloPBenedetti avatar Apr 23 '18 00:04 RomuloPBenedetti