-
Notifications
You must be signed in to change notification settings - Fork 286
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
Retina support #1378
Retina support #1378
Conversation
…in places where it makes sense to do so.
fixes #1044 Previously, it would stay at the default 128x128 unless you manually changed the interface after every launch.
Some of the code seems to have been based on the assumption that max icon size will always be 128 x 128.
Just documenting a few things said in IRC: It seems like a lot of the NSImage code in QS could likely be unneeded now, after many of the NSImage API changes in 10.5/10.6. We may potentially still need to One thing I just noticed: when we do clean this up, can we remove QSObject.m:L55 |
…ize: These shouldn't be necessary any more.
Try that last commit. I've tested on a non-retina screen. Seems fine. I wonder how much of what I see is from cached Quick Look stuff, but I've brought up "new" things and they all seem to render correctly. Assuming it works, it sure is easier than trying to figure out which representations we need. :-) |
Yep, everything seems fine :) The menu interface is funny (what you said about not all the text showing up) but everything else is fine. Another couple of points:
|
I was able to reproduce this with B72. Our first hotfix. :-( |
Have you already done a git bisect? Sounds like you know where it's from. On 9 February 2013 02:28, Rob McBroom notifications@github.com wrote:
|
No, but I'm pretty sure I know what causes it. The result window NIB is observing the row height. I think the result window gets released when the interface changes, so changing the pref in that state causes a crash. If you invoke the interface and make the result window appear, there's no crash (because new instance is created I assume). So there's the problem. No idea how to fix it though. :-) |
OK, so turns out this is nothing new in ß72. It's been around since forever On 9 February 2013 17:58, Rob McBroom notifications@github.com wrote:
|
ImageNamed is cool, BTW. Seems to be some overlap with the stuff in CoreTypes, but some are unique. All come through nice and crisp on a retina display. |
and remove unnecessary code to create a specific representation
See if commenting lines 97 and 98 in |
The QSMaxIconSize should only apply to the main interface, not all these other contexts.
makes sure this method has exclusive control of the image's size
4 mote commits. The only other weird thing I'm aware of is the appearance of the "Hold ⌘Q to Quit" window. The text doesn't quite fit, and just before the quit happens, the image jumps to a larger size. |
I don't know why the unsure quit dialog uses a weird button cell thingy. See my latest commit on r2 which uses an image well instead - try that. Out On 15 February 2013 14:03, Rob McBroom notifications@github.com wrote:
|
Looks perfect now, but once it's on screen, it never goes away (whether you hold the keys or not). Never quits either. I'll see if I can figure it out. Thanks for getting it that far. |
* balance space above and below the content * remove the titlebar * center the window with NIB settings * change deployment target to 10.6
* make sure everything refuses first responder * cast the window to QSBorderlessWindow * remove unnecessary code
I'm assuming you'll deal with getting this into release and stuff. Seems like you know what you're doing with the branches :P |
Seems like it. :-) |
This adds the
@2x
icons supplied by Dan so far and allows preview icons to be rendered at the maximum quality on retina displays, along with some other fixes.Specifically
NSSize()
calls. I changed them to use the pre-definedQSSizeXXX
values instead. Makes no difference really, but it could. Instead of doubling the size claimed by the interface controllers, we could instead just double all the QSSize definitions. So everywhere in the code that refers to QSSize128, it would actually get a 256x256 representation.Things I didn't address, but we should talk about:
createIconRepresentations
in some of the places we're using it. If I understand correctly, we usually only need to generate the size used by the QSObjectCell, and the size used in the results list (and their 2x counterparts) for the main interface. For prefs and things where the icons are smaller, it should be able to request the appropriate sizes as well instead of getting them all.createIconRepresentations
are hard-coded, you could very well end up not generating the necessary sizes. For example, an interface might have a max icon size of 400x400 or something. So the "size used by the QSObjectCell" referenced above needs to be determined at runtime.We can't just change
createIconRepresentations
because it's a category onNSImage
and has no knowledge of the interface's current size requirements. But I'd hate for every place that currently calls it with a bunch of code to do the same thing. (There are some plug-ins that use it.) Perhaps we could create a method in the interface controller to generate icons instead of using theNSImage
category.