Custom Viewer Size (zoom) button

I created a script to enter a custom view size (zoom) percentage for the standalone image viewer. I added the script to both the View->View Size menu and equivalent context menu.

The script allows you to enter a specific zoom percentage (e.g. 125 for 125%) or you can preface the number with a plus sign (+) or minus sign (-) to increase or decrease the zoom percentage relative to the current zoom percentage. For example, if the current zoom percentage is 150%, you can enter -25 to decrease it to 125% or +5 to increase it to 155%.

Here's the script:

@set size {dlgstring|Enter the desired zoom percentage (without % sign).\n\nNote: To increase/decrease the zoom % relative to the current zoom %, preface the number with a plus (+) or minus (-) sign.
@set zoom "zoom,{$size}"
Show VIEWERCMD={$zoom}

As you can see in the command editor image below, I also assigned it a hotkey (Ctrl+9) to invoke it via keyboard as well.


Hope others find this as useful as I do.