Center pages vertically - #116
Merged
Merged
Conversation
maxdexh
force-pushed
the
center-pages-vertically
branch
from
November 24, 2025 21:27
ee39177 to
51b50ba
Compare
Owner
|
Yeah, this definitely looks much better. Thanks for adding it! |
Owner
|
Also, I couldn't help but notice the shell.nix from the previous commit - I don't use nix for development myself, but I understand its usefulness, so I wouldn't mind adding it to the repo if you would like. I'm fine either way, though. |
Collaborator
Author
|
One day I will learn not to commit these on accident ;) I'm also fine either way, I just copied the build inputs from the |
Collaborator
Author
|
Idk if you care about typos, I just noticed I misspelled "sporadically" in my code comment. |
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.
This PR applies logic similar to the current
unused_width / 2-based horizontal centering to implement vertical centering.My aim here was to improve how wide pages (such as slides with wider aspect ratios than the window) look in fullscreen (since they get stuck at the top of the area), but I found that I personally strongly prefer this look in general, so I am just creating this PR as-is.
This behavior would be very easy to make configurable if desired, simply by adding a condition around
img_area.y += unused_height / 2.