# \[SOLVED\] ComponentBoundsConstrainer behaviour with setFixedAspectRatio

**URL:** <https://forum.juce.com/t/solved-componentboundsconstrainer-behaviour-with-setfixedaspectratio/18351>\
**Category:** General JUCE discussion\
**Created:** [July 7, 2016, 10:14am UTC](https://forum.juce.com/t/solved-componentboundsconstrainer-behaviour-with-setfixedaspectratio/18351 "2016-07-07T10:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [July 7, 2016, 10:14am UTC](https://forum.juce.com/t/solved-componentboundsconstrainer-behaviour-with-setfixedaspectratio/18351/1 "2016-07-07T10:14:47Z")

</div>

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:

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

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [July 7, 2016, 3:16pm UTC](https://forum.juce.com/t/solved-componentboundsconstrainer-behaviour-with-setfixedaspectratio/18351/2 "2016-07-07T15:16:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [July 7, 2016, 3:21pm UTC](https://forum.juce.com/t/solved-componentboundsconstrainer-behaviour-with-setfixedaspectratio/18351/3 "2016-07-07T15:21:40Z")

</div>

Yep, it works great now.  
Thanks Fabian!
