stefanceriu / SCXcodeMiniMap

Sublime Text like Minimap for Xcode
GNU General Public License v3.0
1.03k stars 87 forks source link

Changed SCSelectionView to use the inverse of the brightnessComponent of the current theme's background color. Also fixes #1 #2

Closed sneakyness closed 11 years ago

sneakyness commented 11 years ago

Midnight has been my theme of choice for a very long time, but I was having trouble seeing the black selectionView against a black background.

Screenshot: image

Bonus SCInvertedSelectionView, which is mostly useless, until I invert everything else.

stefanceriu commented 11 years ago

For me, this crashes Xcode:

[MT] DVTAssertions: UNCAUGHT EXCEPTION (NSInvalidArgumentException): *\ -brightnessComponent not valid for the NSColor NSNamedColorSpace System textBackgroundColor; need to first convert colorspace.

sneakyness commented 11 years ago

That's interesting, I've never seen that. Is there a specific theme you're using it with? Are you on 10.7 or 10.8?

stefanceriu commented 11 years ago

I'm on OS X 10.8.3 Xcode Version 4.6.2 (4H1003) and using the default theme. Unfortunately I can't really look into it now but maybe I'll figure it out tonight..

sneakyness commented 11 years ago

Oh look at that. I think I tried this with just about every theme EXCEPT for default. That's cute. I will dig.

sneakyness commented 11 years ago

I think I squished it.

stefanceriu commented 11 years ago

I also took the liberty of rewriting it a little bit..

sneakyness commented 11 years ago

Yours is much cleaner :+1:

Been using this all day, what a breath of fresh air!!!

Now if I could only figure out how to pass the scroll events through… (any pointers??)

stefanceriu commented 11 years ago

Happy you like it :) I was thinking of having a faster scroll feature while over the minimap but I'm not really sure how usable that would be until I give it a go. As for directly passing events.. I haven't the foggiest but I would start from the SCTextView and move down from that I guess.

Thank you for contributing ! :)