p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Change text size based on if computer is desktop or laptop

Open potatochipsnotincluded opened this issue 3 years ago • 3 comments

Hi! I think that it there should be a feature where depending on if you have a laptop or pc change the text size, I've tested this code snippet: navigator.getBattery().then(function(battery) { if (battery.charging && battery.chargingTime === 0) { console.log("I'm a desktop") } else { console.log("I'm not a desktop") } }); and it works! Maybe someone can add this in!

potatochipsnotincluded avatar Jul 16 '22 17:07 potatochipsnotincluded

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

welcome[bot] avatar Jul 16 '22 17:07 welcome[bot]

We can already change the font size in the settings, but in what situations do we need this feature?

3ru avatar Jul 17 '22 11:07 3ru

Well sometimes I need to work on a laptop but I don't want to have to change the font setting because I have to change it back when I'm on desktop, so maybe there could be a setting for default laptop text size and default desktop font size. But I realized if the laptop is charged to 100% the code snippet will say it's a desktop and, I don't know how to fix that, so maybe someone else can fix it?

Oh, I almost forgot, the code snippet I gave you is from StackOverFlow here's the link to it,: https://stackoverflow.com/questions/42596664/detect-whether-client-system-is-laptop-or-desktop-using-javascript

potatochipsnotincluded avatar Jul 17 '22 15:07 potatochipsnotincluded