Fix returning wrong client size for some controls in wxOSX

Make sure we are not neglecting the layout insets, for controls like
button, choice and gauge, otherwise client sizes became larger than
control sizes.

Closes #18717.
This commit is contained in:
Stefan Csomor
2020-07-20 17:57:33 +02:00
committed by Vadim Zeitlin
parent d7d7505974
commit d58e3e3ce6

View File

@@ -3083,6 +3083,13 @@ void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &hei
{
left = top = 0;
GetSize( width, height );
int leftinset, topinset, rightinset, bottominset;
GetLayoutInset( leftinset, topinset, rightinset, bottominset);
left += leftinset;
top += topinset;
width -= leftinset + rightinset;
height -= topinset + bottominset;
}
}