mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
Fix #8067: [OSX] Calculate title bar height instead of assuming a fixed value.
This commit is contained in:
parent
0f91cb0479
commit
6e8be3b03e
@ -569,7 +569,8 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp)
|
||||
[ this->window setContentSize:contentRect.size ];
|
||||
|
||||
/* Ensure frame height - title bar height >= view height */
|
||||
contentRect.size.height = Clamp(height, 0, (int)[ this->window frame ].size.height - 22 /* 22 is the height of title bar of window*/);
|
||||
float content_height = [ this->window contentRectForFrameRect:[ this->window frame ] ].size.height;
|
||||
contentRect.size.height = Clamp(height, 0, (int)content_height);
|
||||
|
||||
if (this->cocoaview != nil) {
|
||||
height = (int)contentRect.size.height;
|
||||
|
Loading…
Reference in New Issue
Block a user