Projucer proportional width strange behavior OS X 11.1

Hi I have a strange behavior in projucer. I don’t understand what I’m doing wrong.
My JUCE version is said up to date.
I ended up doing a small test :
I create a new GUI component with say initial width in class = 600
I add 3 rectangles with x = 0 and width = 600
1st rect : I change width mode to percentage of parent width. It says 40,053% and not 100%
2nd rect : I stay in absolute width = 600
3nd rect : i set width mode to 100% then switch back to absolute width, it says 1498 and not 600

the GUI editor windows shows a 1498 width and not 600
with command T : only the 2nd has the right width (= full window width, 600 I assume, but of course rect doesn’t get resized
It’s a big problem as I have to mix both modes in the real screen I try to do and I’m in trouble to design anything.
Would you know what happens ? Regards. LucB

Hi I’ve tried with the last projucer 6.0.8 and I have the same incorrect behavior that looks like a bug ? I’m in OS X Big Sur, 4K screen, monitor system preference = monitor scaling simulating 2560x1440 res. I have different results if I change the simulated resolution to the lowest 1920x1080 where it’s closer to the good percentages ( but not quite exact).

I retried with a GUI Component 1200 width x 800
I add to it a Label x = 100, y = 200, width= 300 height = 400
If I put everything proportional to parent, it says incorrectely
x = 5,43% y = 17,496% w = 16,32% h = 34,992%
and not
x = 8,333% y = 25% w = 25% h = 50%
as if the parent was around 1840 x 1143 and not 1200x800
What happens ?
I assume the parent is what is find in the class tab (so 1200 x 800) ?
It seems projucer doesn’t take in account correctly the monitor system preference when calculating the percentages
I’d really like to do a rescalable UI on a per window basis
Best regards. LucB

Unfortunately the GUI-designer tool in the Projucer is no longer being actively maintained, and we are unlikely to fix issues in this area of the Projucer. I expect the GUI designer tool to be removed completely in a future version of JUCE.

Two alternative approaches you could try:

  • Write manual layout code in the resized methods of your components.
  • If you really want a GUI-based design tool, you could try out @daniel’s Plugin GUI Magic library. This is a third-party library which is not affliated with JUCE. It fills a similar niche to the Projucer’s GUI designer.
1 Like