I’m trying to use setResizeLimits on a DocumentWindow to constraint the size of the component inside to a minimum value.
If my inside component width and height are W and H, then I would have though that
const BorderSize borders (getBorderThickness()); const BorderSize borders2 (getContentComponentBorder()); setResizeLimits(W + borders.getLeftAndRight() + borders2.getLeftAndRight(), H + borders.getTopAndBottom() + borders2.getTopAndBottom() + getTitleBarHeight(), 10000, 10000);
would be the correct code.
Unfortunately this do not work with windows with native title bar
On Windows I must add 8 to the width and 27 to the height.
On Mac I should add some too but not the same values.
Any idea what’s wrong ?
(I’m using the tip by the way)