-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Mac: size of window does not take into account title bar height, view cut off at top #1393
Comments
Is this broken in 3.4 or just develop? There is a fix in a branch that hasn't gotten merged into develop yet. |
Using this version:
The project was created with SB 1.4.8.rc if I remember correctly. |
LearnCocos2D
added a commit
to KoboldKit/SpriteBuilder
that referenced
this issue
Mar 3, 2015
…nt title bar height, view cut off at top
LearnCocos2D
added a commit
to KoboldKit/SpriteBuilder
that referenced
this issue
Mar 3, 2015
…nt title bar height, view cut off at top
Fixed it in the SB template project for now. |
LearnCocos2D
added a commit
to KoboldKit/SpriteBuilder
that referenced
this issue
Mar 4, 2015
…nt title bar height, view cut off at top
LearnCocos2D
added a commit
to KoboldKit/SpriteBuilder
that referenced
this issue
Mar 4, 2015
… consideration
+1 seeing this too |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
To reproduce, create a new project, add a label that's top-left aligned with position 0,0 and anchorpoint 0,1 .. something like this:
Run Mac build, first two lines are cut off in this example:

The problem is with how the AppDelegate initializes window and view with the same size:
This does not take into account that the window creates a title bar which covers the top area of the window, so any view must be "titlebar height" smaller than the window, respectively the window's height must be increased by that amount.
Commonly title bar height is determined like so:
To fix this, change the initialization of window and view to this:
The text was updated successfully, but these errors were encountered: