Skip to content

Conversation

@allejok96
Copy link
Contributor

@allejok96 allejok96 commented Jul 22, 2025

Fixes #7984

Currently the "Handles" loop edit mode is kinda useless since the most common use (move one end of the loop) is restricted to a tiny area. On the other hand the "Grab closest" mode is infamously annoying because it cannot reach the other loop marker if it's far off screen.

This PR merges both modes into one. It grabs the closest handle, whether you click inside our outside the loop. If one handle is off screen it acts if that handle was at the screen's edge (so if you click closer to the edge, it grabs that handle instead). There's a small move handle in the middle. The move cursor is a hand instead of <-> to make it easier on your brain. If the loop is tiny, the whole loop becomes a move handle, and the empty spaces beside is used to resize.

Skarminspelning.2025-07-23.00-47-27.mp4

The video is a bit laggy...

Update: now only the middle handle is drawn and the setting is called "Grab closest".

@bratpeki
Copy link
Member

Isn't there an option in the settings for the loop handles mode? Does this clash with that?

@allejok96
Copy link
Contributor Author

It's the same thing. I changed it in the settings dialog too.

Copy link
Member

@messmerd messmerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and didn't find any issues. And the code changes seem fine.

However, I wonder if "Grab closest" might be a more accurate description of the new combined "Handles"/"Grab closest" mode?

The left and right handles do not really do anything now, so is there a point in drawing them? Unless it just looks better that way?

@allejok96
Copy link
Contributor Author

@messmerd good points! I agree that the left/right handles add nothing useful. The code is now cleaner, thanks!

I also removed unused code related to theming of the [ ] resize cursor's hotspot (aka the clicky part of the cursor). Since the QCursor is defined in the header, the hotspot values could not even be themed (I tested). I suppose that's why @Spekular just hardcoded the hotspots to 0px left and 32px right, but maybe just forgot to remove unused code. I don't think the hardcoded values is a big deal. A custom cursor will work as long as the pixmap has the same width.

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.

Loop ends at the start, negative seconds timer

3 participants