Skip to content

added a nextFitMode action - #589

Open
vihutr wants to merge 3 commits into
easymodo:masterfrom
vihutr:master
Open

added a nextFitMode action#589
vihutr wants to merge 3 commits into
easymodo:masterfrom
vihutr:master

Conversation

@vihutr

@vihutr vihutr commented Feb 25, 2025

Copy link
Copy Markdown

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

easymodo commented Mar 3, 2025

Copy link
Copy Markdown
Owner

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

vihutr commented Mar 3, 2025

Copy link
Copy Markdown
Author

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