[SOLVED] ComponentBoundsConstrainer behaviour with setFixedAspectRatio


#1

Hi there,
I’m experiencing a strange behaviour when I try to resize a DocumentWindow by its borders and setFixedAspectRatio is set on its constrainer.
Basically I can enlarge the window but I can’t reduce it.
It works fine if I drag a corner.

Steps to reproduce:

  • Create a GUI application with the ProJucer

  • In the MainWindow constructor, before making the window visible, add:

    setResizable(true, false);
    getConstrainer()->setFixedAspectRatio(0.7);

I’m on a mac running El Capitan 10.11.5.
Cheers!


#2

Hi masshacker,

Thank you for the bug report! I just pushed a fix for this on the develop branch.

Let me know if it works.

Fabian


#3

Yep, it works great now.
Thanks Fabian!