Add margins setting for paged view#3328
Open
pialony wants to merge 1 commit into
Open
Conversation
Author
|
Related to Jays2Kings/tachiyomiJ2K#1540 |
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.
DISCLAIMER: This was done with AI assistance. However I did review and polish the code before submitting it.
There are situations when a user may desire to add some margin to the full screen paged view, but still retain the Scale type setting (such as Fit to screen and so on).
For example, (my own issue that I wanted to fix) there are some e-ink devices that cut the display a tiny bit, so when viewing on full display, part of the image is being cut.
Additionally, some viewers may want to avoid round corners or the camera notch of their display.
This change adds 4 sliders for each side and color selection of the margin in the app settings and in the viewer mode.
It retains how things are done, unless you add a margin, and will also revert back if margin is 0. So it should not affect anyone unless they actually use this option.
I've decided to add a section name of it's own in the settings for better visibility.
I put the max value of the sliders to 75px, as more than this makes the slider buggy, but it's good enough to avoid the camera notch on a few devices I've tested.
I would appreciate any feedback for improvement, or any other approach to take here.