atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

Line Numbers are HUGE! #1685

Closed iammerrick closed 9 years ago

frozzare commented 9 years ago

Same problem for me in version 3.1.2

skarmklipp 2014-12-22 12 49 32

iammerrick commented 9 years ago

Yup that is how mine looks....

atg commented 9 years ago

Yes this is to do with having a non-retina display connected to a retina display. It's getting confused.

atg commented 9 years ago

Problem is I have no way to test this because I only have one display :|

Actually I have no idea why this is broken, because isRetina() remembers its result as a static variable, so it should be drawing it consistently. wtf

Are you guys disconnecting your screens while Chocolat is open or something? What screens do you have plugged in?

frozzare commented 9 years ago

When I connect my macbook pro to external monitors and chocolat already is open the line numbers are small to I restart chocolat.

When I have huge numbers and disconnect the monitors the line numbers are huge until I restart chocolat without external monitors.

At home I have cheap monitors but at work I have expensive monitors and non are retina monitors. The same issue for all non retina external monitors I tried.

atg commented 9 years ago

Oh that makes more sense. I was turning retina on and off and it was working fine. So I couldn't figure out why it would be broken even with an external monitor.

If you disconnect a monitor that is something I haven't tested for but could conceivably trigger something like this.

I think what I will do is just invalidate the bitmap caches if the screen configuration changes.

yankcrime commented 9 years ago

+1 on this issue - I've got this problem with a trial installation of Chocolat 3.1.2 on my rMBP connected to a (non-Retina) external monitor. It happens if I launch Chocolat after I connect this monitor.

yankcrime commented 9 years ago

Bit of an update - I've noticed that if I launch Chocolat on my external (non-retina) monitor, then the line numbers are huge. If I launch it first on my rMBP's screen then it's fine.

claymill commented 9 years ago

Same behavior here. It looks fine if I launch from the Retina screen and drag Chocolat to the external display, but launching on external causes the huge numbers (which also stay huge when I drag the window to the Retina display).

atg commented 9 years ago

OK I think I've figured out what is going on (and I didn't even have to buy this £15 piece of plastic!)

It all hinges on my misunderstanding of what +[NSScreen mainScreen] does. I was assuming that it means the internal screen, which is why this bug made no sense. The internal screen's retinaness never changes, so if +mainScreen was the internal screen, it would look just fine.

But it occurred to me that if you plugged in an external display, the main screen could change to the external display, and then when you unplugged it it could change back to the internal display.

So I guess the fix for this is to check if any screen is a retina display.

pketh commented 9 years ago

When I use a retina iMac with a non-retina display I get the opposite - tiny numbers. It sounds like the proposed fix will probably address this case too.

atg commented 9 years ago

So I've attempted to fix this in 3.1.3 which is out today. If anybody here could test it I'd be grateful.

If it's still broken I guess I'll have to fork out that £15 ;)

frozzare commented 9 years ago

3.1.3 works for me! Good work @fileability :smile:

bazscott commented 9 years ago

Yep 3.1.3 looks good to me too. Plugging, unplugging, restarting Chocolat, every combination I can think of. Thanks \o/

yankcrime commented 9 years ago

Happy to confirm that this works for me also.

locks commented 9 years ago

:dancers: