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

Title bar colour on retina display border issue #111

Open
kieransenior opened this issue Jun 6, 2013 · 14 comments
Open

Title bar colour on retina display border issue #111

kieransenior opened this issue Jun 6, 2013 · 14 comments
Labels

Comments

@kieransenior
Copy link

Hey there,

I've noticed that on a retina display the border has a lighter coloured line on top regardless of what you set the title bar colour to be. Perhaps I'm doing something wrong? Any hints?
screen shot 2013-06-06 at 15 51 05

@indragiek
Copy link
Owner

Seems like the drawing rectangle passed into the drawing block might be 1px too small. Could you try increasing the height of your drawing rectangle by 1 pixel and see if it works?

@kieransenior
Copy link
Author

Do you mean just setting titleBarHeight with an extra pixel? If so, I've tried that to no avail.

@kieransenior
Copy link
Author

@indragiek This is the line of code which is the culprit. Get rid of that and it's fixed.

https://github.com/indragiek/INAppStoreWindow/blob/master/INAppStoreWindow.m#L236

@indragiek
Copy link
Owner

That line of code only executes when you're using the default title bar appearance (OS X style) to show the highlight line at the top. If you're using a custom title bar, you should be calling -setTitleBarDrawingBlock: and drawing your custom title bar background in there, and this problem won't appear because the rect will be sized appropriately.

@kieransenior
Copy link
Author

I haven't passed a block to specify a custom title bar yet, nothing is specified in that respect. Here's what's around so far:

INAppStoreWindow *aWindow = (INAppStoreWindow*)[self window];
aWindow.titleBarHeight = 40.0;
aWindow.titleBarStartColor = [NSColor colorWithCalibratedRed:0.1 green:0.3 blue:0.5 alpha:1];
aWindow.titleBarEndColor = [NSColor colorWithCalibratedRed:0.2 green:0.4 blue:0.6 alpha:1];
aWindow.titleTextColor = [NSColor colorWithCalibratedWhite:1.0 alpha:1.0];
aWindow.trafficLightButtonsLeftMargin = (float)12.0;
aWindow.centerTrafficLightButtons = YES;
aWindow.centerFullScreenButton = YES;
aWindow.fullScreenButtonRightMargin = (float)12.0;

So omitting the block causes the problem?

@indragiek
Copy link
Owner

Oops, I forgot about the title bar color properties. I'll think of a good solution.

Indragie Karunaratne

On Fri, Jun 14, 2013 at 9:27 AM, Kieran Senior notifications@github.com
wrote:

I haven't passed a block to specify a custom title bar yet, nothing is specified in that respect. Here's what's around so far:
INAppStoreWindow aWindow = (INAppStoreWindow)[self window];
aWindow.titleBarHeight = 40.0;
aWindow.titleBarStartColor = [NSColor colorWithCalibratedRed:0.1 green:0.3 blue:0.5 alpha:1];
aWindow.titleBarEndColor = [NSColor colorWithCalibratedRed:0.2 green:0.4 blue:0.6 alpha:1];
aWindow.titleTextColor = [NSColor colorWithCalibratedWhite:1.0 alpha:1.0];
aWindow.trafficLightButtonsLeftMargin = (float)12.0;
aWindow.centerTrafficLightButtons = YES;
aWindow.centerFullScreenButton = YES;
aWindow.fullScreenButtonRightMargin = (float)12.0;

So omitting the block causes the problem?

Reply to this email directly or view it on GitHub:
#111 (comment)

@zakdances
Copy link

Was a fix ever merged in for this issue?

@indragiek
Copy link
Owner

Not yet. Sorry, totally forgot about this. I'll see if I can put together a fix sometime this week. If you have a solution before then, please feel free to submit a pull request.

@zakdances
Copy link

I haven't had a change to look at this in-depth yet. Were you able to explore a possible fix?

@kieransenior
Copy link
Author

Sorry not yet, this one fell off my radar until I get time to reinvestigate it.

On 3 Oct 2013, at 18:41, zakdances notifications@github.com wrote:

I haven't had a change to look at this in-depth yet. Were you able to explore a possible fix?


Reply to this email directly or view it on GitHub.

@zakdances
Copy link

I've done a little investigating and this is what I'm guessing: INAppStoreWindow's titleBar simply overlaps the default titleBar. Because the default titleBar is kept on, it insets the contentView of the window by 1 pixel (you can NSLog the frame of the contentView to confirm). So what you're seeing here is the default titleBar peaking above the inset INAppStoreWindow titleBar. Does this correspond with what you're seeing as well?

@kieransenior
Copy link
Author

Yeah that's right - it was just one pixel off from the top. As I say, I'd love to devote some more time to this but I'm swamped at the moment and the project using InAppStoreWindow has been lowered in priority for the moment. I'll re-address it in the near future hopefully. If you manage to find a fix before I do I'll check it out. Issue a pull request and I can check that out and see if it works as I expect, unless I get around to it first :)

@vojto
Copy link

vojto commented Apr 23, 2014

+1 :-(

@jakepetroules
Copy link
Contributor

Still an issue? Rendering code geometry has changed quite a bit recently.

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

5 participants