Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document based apps have title hidden by titleBarView. #68

Closed
andrewmichaelson opened this issue Oct 3, 2012 · 3 comments
Closed

Document based apps have title hidden by titleBarView. #68

andrewmichaelson opened this issue Oct 3, 2012 · 3 comments
Labels

Comments

@andrewmichaelson
Copy link

INAppStoreWindow draws the titleBarView on top of the standard title bar text. This prevents a document-based application from correctly showing the document name in the titlebar. This issue can be visualized by inserting:

NSRect titleBarViewFrame = window.titleBarView.frame;
titleBarViewFrame.origin.y -= 20.0;
window.titleBarView.frame = titleBarViewFrame;

in the -windowControllerDidLoadNib: method of Document.m in the SampleDocumentApp. The original title becomes visible when the titleBarView is moved downwards revealing the original title.

@claudenobs
Copy link

just a quick note: this only affects the visibility of the document name. Version controls as well as the path control & document icon show up correctly. UI also works as expected.
nsThemedFrame draws the title into its background in _drawTitleStringIn:. this is private api.

@indragiek
Copy link
Owner

This is a known issue. We put the title bar view over the theme frame's background, so the default title won't be visible. Only way to solve this is to draw the title manually into the view. This doesn't affect the path control and other widgets because they are placed above the title bar view. I initially didn't plan on having INAppStoreWindow supporting titles, but I suppose they do make sense for document based apps.

I'll implement title drawing if I have some free time. In the meanwhile, if this is an urgent need then you may find it quicker to implement yourself :) If you do, a pull request would be much appreciated!

@indragiek
Copy link
Owner

Title bar drawing has been implemented in #90. This should solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants