qimgv icon indicating copy to clipboard operation
qimgv copied to clipboard

added a nextFitMode action

Open vihutr opened this issue 10 months ago • 2 comments

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?

vihutr avatar Feb 25 '25 04:02 vihutr

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);

easymodo avatar Mar 03 '25 09:03 easymodo

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?

vihutr avatar Mar 03 '25 19:03 vihutr