Code Monkey home page Code Monkey logo

Comments (3)

domluther avatar domluther commented on July 18, 2024 1

We should definitely implement a way to adjust the overall zoom! Not only is it helpful for presenting to a room, as you suggested, but it can also be an accessibility feature for an individual.

Here's a workaround for people who are comfortable with the browser console, though it's a poor substitute for the proper feature. Note that this works only in the Mac or Windows app, not on the web or Android / Chrome OS versions. (We also need to implement zoom in the Android app!)

First, open the browser console with Ctrl+Shift+i on Windows, or Cmd+Opt+i on Mac. Then, type this in the console:

const {webFrame} = require('electron');
webFrame.setZoomLevel(1);
webFrame.setZoomFactor(1.3);

You can use setZoomLevel to change the zoom in browser-defined increments, where 0 means "normal" zoom, or setZoomFactor to set the zoom level exactly, where 1 means 100% zoom.

More information is available here: https://zeke.github.io/electron.atom.io/docs/api/web-frame/

Given that code works just fine (but is very fiddly to do), could this please be added to a feature? As mentioned, I can change the visibility of the code but it means the blocks themselves can be very hard for students to see.

from scratch-desktop.

cwillisf avatar cwillisf commented on July 18, 2024

We should definitely implement a way to adjust the overall zoom! Not only is it helpful for presenting to a room, as you suggested, but it can also be an accessibility feature for an individual.

Here's a workaround for people who are comfortable with the browser console, though it's a poor substitute for the proper feature. Note that this works only in the Mac or Windows app, not on the web or Android / Chrome OS versions. (We also need to implement zoom in the Android app!)

First, open the browser console with Ctrl+Shift+i on Windows, or Cmd+Opt+i on Mac. Then, type this in the console:

const {webFrame} = require('electron');
webFrame.setZoomLevel(1);
webFrame.setZoomFactor(1.3);

You can use setZoomLevel to change the zoom in browser-defined increments, where 0 means "normal" zoom, or setZoomFactor to set the zoom level exactly, where 1 means 100% zoom.

More information is available here: https://zeke.github.io/electron.atom.io/docs/api/web-frame/

from scratch-desktop.

cwillisf avatar cwillisf commented on July 18, 2024

Somewhat related to LLK/scratch-android#58

from scratch-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.