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

autoscroll qt symbol and improvments #6

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

adeliktas
Copy link

following improvments:
-qt symbol (hidden until) autoscrolling
-clear primary and secondary clipboard on middlemouse/autoscroll
-quick autoscroll

@TWolczanski
Copy link
Owner

TWolczanski commented Nov 14, 2021

Thanks for the pull request!
Unfortunately, your code doesn't work well for me (I'm using Ubuntu Budgie 21.04). It's glitchy and uses up a lot of CPU (even 50%). Also, the icon that appears on the screen is kind of ugly - it would be better if it looked similar to the one we get in Firefox. However, your code is a great starting point to solving Change icon when enabled #1. I like the idea of clearing the clipboard too (but only when the button used for entering the scroll mode is in fact the middle mouse button).

small hotfix cpu usage, clip clear on middle mouse
@adeliktas
Copy link
Author

I've hotfixed the cpu usage, it shouldn't reach that level anymore, but it still will be considerably high with up to 5% cpu usage,
because the time.sleep methods, which are impacting performance by halting the thread, have to be properly replaced with QTimer for example.
The autoscroll-timing noticeably differs from the original with time sleep.

I have also changed clear clip, it will only do so when the middle mouse button is used.

I'm allright with the "icon", which is drawn with just a circle and 2 lines for a cross, but to change the "icon" to the firefox autoscroll symbol, would mean a ∧ [caret/(logical and)] and ∨ [upside down caret/(logical or)], which you could draw with 2 lines each, with a dot/circle in the center. Feel free to do so.

For the icon, drawing an Image to Canvas, using a vector graphic for any scaleable size without loss would be optimal.
But this would require some research with Qt or any other drawing library in this combination and it's potential performance impact (if any).

I would love to see, as for functionality, an autoscroll just like in firefox browser for the system.

I will improve this in future, when i got free time (hopefully soon). That being said, this PR is supposed to be for guidance, so others can jump in and work/improve on this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants