Improve the current image viewer implementation#110
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new implementation is mostly based on Loupe and Komikku implementations.
Partially closes #92
Changes:
Gtk.ScrollableinterfaceNot tested:
Support for touchpads/touchscreensTested