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
Feature Request: Add query methods for Visual/Layout ZoomLevelLimits #12994
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
You are more than welcome to submit a PR 🙂 |
@sofianguy awesome! I'll be on it tomorrow. |
@sofianguy hey, I've started doing some research, and I've traced the Any chance to get like a hint or something here? |
Also, in what IDE do you develop code in C++? I tried using VSCode, but obviously without a proper indexer I would have any completions in the code... |
@sofianguy anything? I'd love to work on this but I need some assistance |
@gioragutt I'm not sure if there is a good code hinting/completion tool for developing Electron since the build system is not as popular as something like cmake, and not much IDE supports it. I've been using VSCode and the best results I get is some jumping to declaration/definition and basic (but quick) searching. Since the codebase is quite spread-out, IntelliSense comes pretty slow. Not sure if any fellow contributors have a better solution to set up the dev env. |
I rock VS Code as well, if you're looking for stuff in chromium your best bet is to use https://cs.chromium.org though to search and jump |
Is your feature request related to a problem? Please describe.
The related PR - microsoft/vscode#49858 (Issue: microsoft/vscode#48357) - The UI setting of the zoom level was unbounded, although the actual zoom level has clear limits (
+9
<->-8
).We use the
webFrame
module ofelectron
the get the zoom level, but it seems to be unbounded, at least not to reasonable values.I've looked at the
.d.ts
declaration and at theweb-frame.js
and thec++
header which definesWebFrame
, and I can only see a method toSet
the layout and visual zoom level limits, but not retrieve them.Describe the solution you'd like
I want to be able to logically bind the UI settings the values that
electron
itself bounds, not hard coded values that might be right for one screen/resolution/etc.Currently in the PR listed above, the bounds are hard-coded, and I enforce them myself, logically, because
webFrame.setZoomLevel
andwebFrame.getZoomLevel
do not match the visual zoom level bounds.I would want to have methods in webFrame, probably called:
Which would be exported to the
js
webFrame
module, which would in-turn allow me to query for the electron bounds value instead of hard coded ones, specifically here, since currently,webFrame.getZoomLevel
/webFrame.setZoomLevel
are not limiting values to the visual zoom level limits.Describe alternatives you've considered
Currently, the PR is not in yet in production, but the workaround was to get the
min
/max
zoom level limits via trial and error, and hard code those limits.Thanks a lot for reading, perhaps tho I've just missed the methods which allow to do this in my research. But if not, that could help a lot.
If it's not too complicated, I'd love to PR it as well.
The text was updated successfully, but these errors were encountered: