Skip to content

Improve the current image viewer implementation#110

Merged
tfuxu merged 5 commits into
mainfrom
improved-image-viewer
Nov 22, 2025
Merged

Improve the current image viewer implementation#110
tfuxu merged 5 commits into
mainfrom
improved-image-viewer

Conversation

@tfuxu

@tfuxu tfuxu commented Oct 24, 2025

Copy link
Copy Markdown
Owner

The new implementation is mostly based on Loupe and Komikku implementations.

Partially closes #92

Changes:

  • Implemented direct scrollability using Gtk.Scrollable interface
  • Targeted (aimed) zooming using current pointer position (or zoom-to-center if current position not found)
  • Adaptive image zoom level to the app window height/width (full best-fit)
  • Added button for resetting the zoom level to the current best-fit
  • More public methods for controlling zoom level

Not tested:

  • Support for touchpads/touchscreens Tested

tfuxu added 5 commits October 24, 2025 16:08
The new implementation is now mostly based on Loupe and Komikku implementations.

Changes:
- Implemented direct scrollability using `Gtk.Scrollable` interface
- Targeted (aimed) zooming using current pointer position (or zoom-to-center if current position not found)
- Adaptive image zoom level to the app window height/width (rudimentary best-fit)
- More public methods for controlling zoom level
- add `Reset Zoom` button to image viewer OSD
- add an entry for the `zoom.best-fit` action in shortcuts window
- pack the icons used in image viewer OSD with the app
This commit makes the current best-fit implementation adjust automatically when resizing the application window.

Changes:
- Implement `_configure_best_fit` private method
- set `best_fit` class property to `True` when the zoom level is equal or less than the current best-fit zoom level
- call `_configure_best_fit` if `best_fit` is set to `True` and if there was an actual app window size change
@tfuxu tfuxu merged commit 5b892c4 into main Nov 22, 2025
2 checks passed
@tfuxu tfuxu deleted the improved-image-viewer branch November 22, 2025 18:26
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.

Potential future preview viewer improvements

1 participant