Introduction: Fixing the Excessive Scale of Arduino IE 2.0
Working with beta software can be exciting but sometimes you can come across some issues that were not fixed yet.
In one such issue, I tried to increase the scale of the Arduino IDE so I can better record my screen for the projects I do but I went overboard and I got stuck to a point that I could not regularly turn it back as it was.
This post is sponsored by PCBWay.
Start playing with Arduinos by getting some of the boards below:
- Arduino Uno - https://s.click.aliexpress.com/e/_A89YSi
- Arduino Uno Starter Kit - https://s.click.aliexpress.com/e/_AL6HQW
- Arduino Pro Mini - https://s.click.aliexpress.com/e/_AMMEew
- RF Nano - https://s.click.aliexpress.com/e/_AFWVp4
- NodeMCU - https://s.click.aliexpress.com/e/_AfV0CO
- ESP32 - https://s.click.aliexpress.com/e/_AL5luw
Step 1: What I Did
The Arduino IDE 2.0 came out as a beta release in March of this year and it is a great upgrade over the original IDE.
One of the most important features that it offers is the ability to autocomplete code where it now offers variable names as suggestions as well as function names from the included libraries.
These features are all great but one of the features that I found was lacking in the new IDE is the ability to zoom into code with the mouse wheel.
In the old IDE, I was able to use Ctrl + Mouse wheel to either increase or decrease the font size of the editor and this was really helpful for filming whenever I needed to show you some of the code that I used with my projects and videos.
Since this no longer works in the new IDE, I was looking for a replacement for this setting and this is when I stumbled upon the "Interface zoom" option in the settings menu.
Wanting to try it out, and not knowing how it works, I immediately raised the value to 400%, thinking that everything on the screen will be four times the size that it was before. However, once I applied the settings I realized that this made everything about 20 times larger, and everything on the UI was overflowing.
Step 2: How I Fixed the Excessive Scale of the IDE
When I now opened the settings again to revert this change, all I could see was the additional boards manager URLs settings field without the ability to restore the zoom level at all. I thought of using the Tab key to navigate to the zoom field so I can modify the value with the keyboard but since I was not seeing the field, I didn't know if I was at the right field so I was basically working blind.
I tried restarting the Arduino IDE a few times but that was also without success as the settings along with the scale value were just reloaded and the IDE started with the same scale as before. I mean. that is exactly what I would expect in normal conditions, but in my case, this made the IDE unusable.
At this point, my only two options were to either uninstall the new IDE and hope that that will also remove the settings or at least give me the option to remove them after the uninstallation or the second option was to explore the folders on the computer in an attempt to find where these settings are being saved and possibly updating them externally.
After some searching around and a few dead ends, I managed to find the file that I was looking for.
I'm using Windows so the path where I found the file is specific to it but it might give you an idea if you are trying to find it on your machine. On Windows, the file is saved in your user directory, under a folder called ".arduinoIDE" and the file is called "settings.json".
When I opened this file with a text editor, I immediately found exactly what I was looking for but in a slightly different format than expected.
On the UI in the Arduino IDE, the value is presented as a percentage, but in the settings file, under the "arduino.window.zoomLevel" variable, I saw a value of 15, indicating some sort of a step count how many times the UI should be increased in size.
I then updated this value from 15, back to 3, so I can test it out and see how it will work on the UI and when I started the IDE now with the new settings, everything was usable again.
I opened the settings screen again and saw that now, the scale was set at 160%, which is 3 steps up from the original size if we consider that the scale goes up by 20% at a time.
Step 3: Enjoy!
With that, I've fixed the appearance of the new Arduino IDE and I can once again use it to write and show you code for future projects.
Cheers and thanks for reading!