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

Zoom in / out not always working #69

Closed
schroef opened this issue Jul 26, 2019 · 25 comments
Closed

Zoom in / out not always working #69

schroef opened this issue Jul 26, 2019 · 25 comments
Assignees
Labels
bug Something isn't working third party Issue with a dependency

Comments

@schroef
Copy link
Contributor

schroef commented Jul 26, 2019

I noticed the new zoom in/out functions in the file menu system. However they dont always react properly for me on OSX. Also cmd + doesnt zoom on my end, i need to press cmd shift + in order to get it working. However cmd - does work. Sometimes it doesn do anything and also the menu items dont respond? Cant figure out whats wrong there though.

@hummingly
Copy link
Collaborator

When I open the menu it also shows that I need to press ctrl + shift + = to zoom in.

@hummingly hummingly added bug Something isn't working third party Issue with a dependency labels Jul 27, 2019
@hummingly
Copy link
Collaborator

The solution is to change the shortcut in main.ts:

{ role: 'zoomin', accelerator: 'CmdOrCtrl+=' }

but then it shows it in the menu as ctrl + =. Furthermore, clicking the menu entry doesn't do anything. I will try to look whether I can add it manually.

@RvanderLaan
Copy link
Collaborator

Other people add two shortcuts for zooming in (for both + and =) but that looks a little weird.
An alternative would be to add the shortcuts in the HotKeys component, and then manually adjusting the webFrame.zoomFactor instead of letting electron handle the shortcuts

@hummingly
Copy link
Collaborator

@RvanderLaan I'm adding manually the click functionality for zoom in/out and reset menu entries right now because it does not work. Leaving the shortcut to the HotKey component seems fine but I haven't fixed my shortcut issue with it (shift+/ on non-american keyboards). Alternatively, we register it ourselvers or add a button to the settings menu to show the hotkeys.

@RvanderLaan
Copy link
Collaborator

Hmm, for me the buttons in the Electron toolbar work fine unless I'm focused on the devtools

@hummingly
Copy link
Collaborator

I tried the github release and packaged it myself but in both cases it does not zoom in/out or reset on clicking the menu entries in View. If I implement it myself, it does work.

@RvanderLaan
Copy link
Collaborator

Right, that's really weird, I didn't check the release version before. Nice that you found a workaround!

@hummingly hummingly self-assigned this Jul 27, 2019
@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

Im looking at the master and i get errors when packaging this master

zoomfactor-error-argument png

@hummingly
Copy link
Collaborator

Did you try yarn install before packaging? I've updated electron and the packager.

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

ill try that, thanks!

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

Is there something which can check if dependencies are up to date? I seem to have this issue now and then. I dont see it until i try to package and then get an error

@hummingly
Copy link
Collaborator

Usually, you only see it in the commits or if your IDE keeps screaming at you that something is wrong even though it passed continous integration on Github already but else not that I know of.

@RvanderLaan
Copy link
Collaborator

Running yarn install (or just yarn) will do that, if everything is up to date it'll tell you that

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

Also awkward is that when i run yarn add electron i get version 5.0.0 but in the package.json it states dependencies "electron": "^6.0.1"?

@hummingly
Copy link
Collaborator

Basically, you're installing the latest version of electron. You probably have now two electron versions in your node_modules.

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

You have any ideas why i know see errors with the menu items in main.ts I had so many issues again. Not sure why or what, updated a bunch of files and now i get these errors. While earlier it was working just fine??

Screen Shot 2019-08-10 at 16 04 37

@hummingly
Copy link
Collaborator

Are you on master or another branch? This seems to be old code.

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

This is on master

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

Sorry this one is, but i get same error. The other one was i believe image-viewer-cssupdate.

Screen Shot 2019-08-10 at 16 13 26

@hummingly
Copy link
Collaborator

Hmm, can you try yarn install on master branch? The only issue you could have is that it cannot recognize the role appMenu in the if statement for apple in line 35 because that is in a higher electron 5 release.

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

okay, i try if electron will update to 6 i wouldnt do that earlier. It would update/install but it was 5.0.8 ??

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

Ps i just checked electron and it is actually 6.0.1 i believe i installed it again with npm this time?
Its quite confussing again

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

I now did yarn install and then electron is 5.0.8???

@hummingly
Copy link
Collaborator

What is written in you package.json? It should be 5.0.8. It could be that in your node_module folder contains two versions and those are conflicting but that shouldn't be the issue. Well, restarting vscode might help, otherwise delete node_modules folder and run yarn install.

@schroef
Copy link
Contributor Author

schroef commented Aug 10, 2019

i think yarn install did it know. Thought i did that already earlier today.

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working third party Issue with a dependency
Projects
None yet
Development

No branches or pull requests

3 participants