• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Zoom to Fit Shortcut (Ctrl-0) fits to full space without gap

Community Beginner ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

Hi

 

When I reinstalled Photoshop on my new Windows computer (v24.0), the Zoom to Fit Shortcut (Ctrl-0) now fills the full space.

 

Previously it left a little gap at the top and bottom so I could easily use the marquee tool to select my artwork at the edges to copy it.

 

Now as its filled to the top and bottom, when I use the marquee tool it moves the board to be able to select up the edges so I have zoom out a bit again to be able to copy upto th edges.

 

Is there a way for it to fill but still leave a small gap still, or is this the way it just works now?

TOPICS
Windows

Views

244

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

And until it is fixed, you can help yourself with a small script. Copy the script into the scripts folder and then assign a shortcut (e.g. CTRL+0).

 

function sTID(s) {return app.stringIDToTypeID(s);}
app.runMenuItem(charIDToTypeID("FtOn"));

setZoom(zoomLevel()*.98);

function zoomLevel(){
if(!documents.length) return;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 
var desc = executeActionGet(ref);
return desc.getDouble(stringIDToTypeID('zoom'))*100;
};

function setZoom( zoom ) {
   cTID = function(s) { return app.charIDToTypeID(s); };
   var docRes = activeDocument.resolution;
   activeDocument.resizeImage( undefined, undefined, 72/(zoom/100), ResampleMethod.NONE );
   var desc = new ActionDescriptor();
   var ref = new ActionReference();
   ref.putEnumerated( cTID( "Mn  " ), cTID( "MnIt" ), cTID( 'PrnS' ) );
   desc.putReference( cTID( "null" ), ref );
   executeAction( cTID( "slct" ), desc, DialogModes.NO );
   activeDocument.resizeImage( undefined, undefined, docRes, ResampleMethod.NONE );
};

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

Thanks for that, but the script doesn't work.

I named it "Fit in window.jsx". I don't know anything about scripting, not sure if that's the right extension.

 

PerBerntsen_0-1667564933079.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

It's working now, I had failed to copy the brace and semicolon at the end.

But I can't figure out how to create a shortcut for it, since it doesn't appear in the list of scripts under File > Scripts – I have to click browse.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

If you have copied it to the Scripts-folder of Photoshop (e.g. ..\Program Files\Adobe\Adobe Photoshop 2022\Presets\Scripts), you have to restart Photoshop - otherwise the entry does not appear.

Then assign the shortcut (Alt + Ctrl + Shift + K)

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

LATEST

Thank you, a restart fixed it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines