Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a nextFitMode action #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

added a nextFitMode action #589

wants to merge 2 commits into from

Conversation

vihutr
Copy link

@vihutr vihutr commented Feb 25, 2025

I assumed that the switch fit mode would either swap between the last fit mode or just go between each but it does not, just toggles two preset ones.
Wondering if we can add another option to cycle through each? Wasn't sure what the best/preferred solution was between adding a prevFitMode or more customization so just went with the most simple, what do you think?

@easymodo
Copy link
Owner

easymodo commented Mar 3, 2025

Wondering if we can add another option to cycle through each?

I'm not against it, sure

But there's no need to cycle into FIT_FREE. So it should go like this

if(viewerWidget->fitMode() == FIT_WINDOW)
    viewerWidget->setFitMode(FIT_WIDTH);
else if(viewerWidget->fitMode() == FIT_WIDTH)
    viewerWidget->setFitMode(FIT_ORIGINAL);
else
    viewerWidget->setFitMode(FIT_WINDOW);

@vihutr
Copy link
Author

vihutr commented Mar 3, 2025

I think I was testing to see if FIT_FREE actually would affect it or not and didn't see anything tangible so I forgot to take it out (or forgot to rebuild it), I realized I left what I added for default keybinds (shift + space for this) as well when verifying that it would behave as expected. Would you prefer updating the readme or taking that out?

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.

2 participants