My first post here. I searched for a similar question/post for a couple hours and found nothing. At any rate, when I hit the maximize button on my simple app, all components temporarily resize. The resize() function for all components are only called once. Once it maximizes, it looks fine.
See the video of this in action here: ftp://ftp.acoustica.com/Temp/shows-resize-issue2.wmv
In my code, I am using a DocumentWindow. It has three components that resize using the bounds().removeFrom…methods as described in the GUI tutorials.
Rectangle bounds = getBounds();
Rectangle controlBounds = bounds.removeFromRight(300);
Rectangle waveBounds = controlBounds.removeFromBottom(100);
Resizing normally has no problem. Any idea on this? Or could this be a bug?
you should use getLocalBounds() not getBounds()
Thanks for the reply, but that does not change anything. The video shows the weird scaling during the maximize. This is on Windows. In addition, when resizing the window by dragging the lower right hand corner, it resizes fine. Only when I maximize does it temporarily show all the components scale up so that the font looks bigger and the graphics looks bigger. I think it could be a bug.
Sounds like it’s just the OS animating the window itself, not anything that juce is drawing. OSX does the same thing, i.e. takes the current window contents, animates it being stretched, then when it’s finished, lets the program draw itself again.
Thanks for the reply! Love the SDK. Brilliant to say the least.
However, I’ve been programming Windows software for 17 years and I have never seen a maximize window resize/scale the internal elements like this before. Did you happen to watch the video that was in the original post? It shouldn’t ‘animate’/scale as it maximizes. And, it doesn’t ‘animate’/scale the opposite way when it ‘restores’ to normal size.
My desired behavior would be for nothing to scale during the maximize and only re-position once. The scaling/animation seems to cause a slow down as well. Other windows in Windows do not scale/animate in this way when maximizing.
Again, thanks for your time.
can you post that video to youtube or vimeo (or even facebook)? can’t really play wmv files in the browser natively on os x…
Ok - here is an MP4 of the same video which should work for you. Thank you for checking it out.
Nothing in juce will do any animated scaling when it maximises - if that happens, it’s Windows doing it, and that’s what it looks like to me in your video.