Skip to content

Add optional hover previous/next navigation buttons - #875

Open
pangziqiang wants to merge 3 commits into
jurplel:mainfrom
pangziqiang:feature/hover-navigation-buttons
Open

pangziqiang wants to merge 3 commits into
jurplel:mainfrom
pangziqiang:feature/hover-navigation-buttons

Conversation

@pangziqiang

Copy link
Copy Markdown

Summary

Adds optional previous/next navigation buttons overlaid on the image view, aimed at mouse- and touch-only users who do not want to use the context menu or keyboard shortcuts.

  • Two subtle circular buttons on the left/right edges of the image view
  • Fade in when the cursor enters the image view and fade out after it leaves
  • Stay fixed in place while zooming, panning, or scrolling
  • Disabled at the first/last image (unless folder looping is enabled)
  • Hidden when the folder contains only one image
  • New Show navigation buttons option under Settings → Miscellaneous, off by default to preserve qView's minimal default behavior
  • Reuses the existing goToFile() navigation logic, so slideshow cancellation, looping, sorting, and preloading behavior stay consistent

Fade-in duration is 160 ms; fade-out starts after a 350 ms hover delay and also takes 160 ms.

Related issues

This PR intentionally implements only the on-screen buttons. Scroll-wheel navigation and swipe gestures are separate pieces and can be handled independently.

Testing

  • Built and tested on macOS 26.2 with Qt 6.10.3 (universal x86_64 + arm64)
  • Existing ActionManagerTests pass (1/1)
  • Manually verified: hidden by default, fade-in on hover, fade-out on leave, disabled states at folder boundaries, the settings toggle taking effect immediately, and button positions remaining fixed while zooming/scrolling
  • The implementation uses only cross-platform Qt APIs; Windows/Linux builds have not been run locally, so CI coverage would be appreciated

Notes

Happy to adjust the default, timing, styling, or split this into smaller commits if preferred.

pangziqiang and others added 3 commits October 19, 2026 01:50
Add previous/next overlay buttons that fade in while hovering the
image and fade out after the cursor leaves. The buttons reuse the
existing navigation logic, disable at folder boundaries, and can be
turned off in the miscellaneous settings.
Parent the overlay buttons to the view rather than its viewport, so
QGraphicsView scrolling and zooming no longer move them or push the
next button out of view.
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.

1 participant