UI Scaling


Hi, are there any brute force scaling options included for the UI?

Been developing the UI on Mac, all looks fine. Moved over to my Windows laptop which has a 4K dispay and everything is tiny. So basically, wondering if there is a simple call I can make which says perform this transformation to all GUI components?




You can apply an affine transformation to components, but this doesn't work for desktop members. I'd say the proper way is to use the resized() method of the main component (and all handmade components that are added as child components). 



that makes sense.... essentially then have to layout everything myself rather than what I did in Introjucer

i guess I could just add everything to a collection and run through that on changing size...


Actually, you can do it for the whole app: Use Desktop::setGlobalScaleFactor()


thanks Jules, handy to know!


ah, cool - just tried calling the affine scale transform on my top level component and that works fine - brilliant stuff!


This does work for most things, but not for popup-menus etc. and tooltips. It doesn't work for anything that's a child of the desktop instead of being part of your top level component.

For applications I don't see this problem on windows btw. For me Juce applies the correct scaling value in its Desktop class automatically. For plugins I had to go this affine transform route. For the popup elements I created a custom lookandfeel that knows about my scaling value and applies it to popup menus and such things. This way I can keep all the needed adjustments in one utility class.


Hi, yes, it's a plugin interface I'm working on - I see what you mean, I've just opened some of my combo boxes and they're not scaled... thanks for the tips, will look into how I can apply scaling to those...