Using Juce latest tip
I think I found a bug when you try to call the DialogWindow::showModalDialog function using a DrawableImage as the content component. The DialogWindow appears to be sized correctly, it’s just not placing its content component in the right spot. The image’s upper left corner is set to the very upper left corner of the DialogWindow, rather than just below the title bar like it should be.
Using the same basic code the showModalDialog() function uses I was able to get it working how I wanted to by just adding a line to make it resize…
[code]
DrawableImage *drawableImg = new DrawableImage();
drawableImg->setImage(img);
DialogWindow *window = new TempDialogWindow(String(L"window"), Colours::white, true);
window->setContentComponent(drawableImg, true, true);
window->centreAroundComponent(NULL, window->getWidth(), window->getHeight());
window->setSize(drawableImg->getWidth(), drawableImg->getHeight() + window->getTitleBarHeight()); // Line that makes things work
window->runModalLoop();
delete window;[/code]