Closed kelargo closed 3 years ago
I need that feature too, and would like to help implementing it. But I am new to JUCE(and C++) development(but have 20 years developing experience with other languages).
Currently I am trying to find the point in the code where the window size is configured in general. I keep working on it, but any pointers on where to look at would be greatly appreciated.
Henning, I'm glad you are willing to try this! If you look in Constants.h there are some sizing constants. In particular, the ones that are interesting are SEQ_SIZE_MAIN_W and SEQ_SIZE_MAIN_H. These are used to set the size. I also looked in the JUCE forums and found this, which might be a good start: https://forum.juce.com/t/best-way-to-implement-resizable-plugin/12644/2
I would use that feature, even if hardcoded the width and height... @henning keep us updated.
@patricksebastien thanks for bumping! ;) ALways good to have some more motivation besides personal interest! I will need some time to get into it due being busy with my day-work and it's also my first real look into a C++/JUCE project despite being developing other software for a long time. Actually I only could look into the code really this friday, and so far, just hardcoding bigger height/width did change only the size of the window, but neither the content nor the font size. I will need to take some time to really look into the juce doc for the components and the link @rudeog posted. Hopefully and likely I will find some more time over the coming holidays...
Few other comments, since we've just been around this with surge in 18 (although surge isn't JUCE)
In theory on an HDPI display the host should call void AudioProcessorEditor::setScaleFactor ( float newScale )
and let you react
In theory after your resize you could call Component::setTransform
with a AffineTransform
for your scale. according to Juce forums it seems since 1 is unreliable a common method (and the method surge uses) is to have a menu saying 'what's my zoom' and then resizing the window (as you did) and then setting the AffineTransform on the root editor component.
Theory != practice and I haven't tried this at all in juce code yet. If you get it working let me know since I would like to do it for the SurgeEffectsBank and maybe Dexed too :)
Thanks
Thank you very much sir! It works really well on linux / bitwig (touchscreen) :+1:
@rudeog cool, thanks! Can I buy you beer somehow for fixing this?
Minor thing with the implementation: it took me a whiule to find the place where i could change this, as it wasn't where the other settings are made, and I didn see that I need to restart to see the result... good thing it's stored in the settings now...
@henning yeah, i put the setting where all the other 'user preference' type settings are, however because the standalone app is something that JUCE framework provides and we get for free, it has its own set of settings, which is a bit confusing. hopefully people will only need to adjust this once to their preference.
A nice feature to have would be to scale the display for High DPI monitors (4K). I compiled and run the source in Ubuntu with xfce desktop. thanks!