Hacker News new | past | comments | ask | show | jobs | submit login
Fixing QuickLook (2023) (foon.uk)
240 points by rogual 5 months ago | hide | past | favorite | 67 comments



This was quite an interesting read, even though I didn't understand some of the details. QuickLook is basically tampering with the accuracy/completeness of the item by using a border and rounded corners. Whoever designed this may have believed that this looks nicer, but there's no good reason to remove information (even if a little bit) while displaying things.


This is lovely.

As someone who doesn't use ObjC in earnest, it's also a good reminder of how nice it is under the hood.


Note that if you're just experimenting you can also use LLDB's breakpoint commands + "thread ret"/reg write to control logic.

But I've had some weird issues using "thread ret" (even when using it as the first instruction in a function when it shouldn't corrupt the stack), so patching memory is probably cleaner.


Cool investigation into the guts of macOS. I had no idea symbols were still present for production builds in macOS and that they are so easily 'hackable'.

I hadn't noticed before, but it is very strange to round corners of images in QuickLook. Apple should revert this change.


Apple provides basic symbols for some of their binaries–particularly older ones. I assume the default setting used to be to not strip those, or some kind soul picked that option and nobody revisited it. Unfortunately a lot of new code is shipped stripped by default :(


You can’t really strip objective-c symbols, can you? I think that would break method dispatch


You might be thinking of Objective-C metadata, which contains information about classes, protocols and categories. Unlike symbols, metadata can’t be stripped.


I’m specifically talking about selectors and things like class names, etc. I can see that you can strip the parts of objective-c that are just C.


You can definitely strip the symbols; the runtime metadata is stored separately.


Yes but what Objective-C people consider “no symbols” looks like symbols to C programmers.


Tell that to ___lldb_unnamed_symbol74$$TextEdit


Yes, but you can often still figure out what the name is if you pause in that method and print _cmd ($arg2), or look at the calling stack entry and see what selector string was used.


Personally I just use a disassembler that parses this metadata for me


The selector system is enough even without debug symbols, since all object method calls are identified at runtime by a human readable string.


Fun fact selectors do not have to be human-readable


Symbols don't have to be human readable either. You can easily write completely inscrutible function names in source code.

I don't see how this point really matters. Sure you can name your functions and selectors stupidly all the same. There are also probably obfuscators for it (Proguard-like?). But that's not really relevant to my point.


I recognized myself in this article, except I usually don't get to the solution at the end. Bravo.

Anyone have a good way to not be distracted by every egregious annoying thing that appears in your daily routine?


be conscious of it, when the shiny thing appears, write it down on a piece of paper and tell yourself you'll come back to it if it's interesting enough. At the end of the day, throw away the paper :)


90% of macOS is legacy code and programs that worked well in OS X and even NeXT OS. It's insane that every once in a while, Apple decides to poke around those areas and make some "improvements". When I put that next to what Microsoft is doing with Windows, I can only ask:

    Have we lost the art of OS design?
I mean, surely there must be designers and programmers in those companies who still know what a good OS experience is like. But are marketing and sales people louder in those companies?


This was a great article. I've been playing around with Smalltalk for a few weeks, which I understand is like the spiritual ancestor of Objective-C, and this reminded me a lot of that. It's probably mostly down to the oddball calling convention, but I wonder if other GUIs are as easy to introspect and patch.


This article is a golden goose for anyone learning lldb or improving on their lldb skills. Thanks!


Didn't Gnome had this feature too at some point in the past? I have a clear memory of this working in Gnome and then not...


Still does. It's called gnome sushi: https://en.wikipedia.org/wiki/GNOME_sushi I discovered it accidentally one day long after I started using gnome, because I had a macos work machine and regained some muscle memory. Great feature.


You have just improved my life significantly. Thank you. I filed it under "good things we had but were taken away", and now it's under "Great things we have". For future travellers: It's not enabled by default in Ubuntu. Gotta apt that thing.


Nice writeup. Annoying behavior of Apple. But is it worth disabling SIP for? No.


Since Windows and Linux don't have an equivalent of SIP, if you're comfortable using Windows or Linux at all, then you should be comfortable disabling SIP on macOS.


I disable SIP for so many other reasons, so this is fine.


Anyone uncomfortable with SIP should probably not be using macOS in the first place.


What should I use instead? Windows that that will track me? Or Linux that lacks the apps that I want to run?

I use a Mac and I disable SIP. Why? Because it makes me happier. I spend all day using a computer. I want the computer to work exactly how I tell it to work. I don’t ever want the computer to refuse to do something even when I enter the root password.

Life is about managing risks. Every day we take risks that are much bigger than disabling SIP: e.g. driving a car, crossing a road, riding a bicycle, eating a hamburger, or going outside without sunblock (if you have light skin) are infinitely more risky than disabling SIP.

If you don’t see any benefit from disabling SIP then feel free to leave it enabled. But don’t let fear run your life. We’re not here forever.


The makers of macOS chose to implement and enable SIP. If you are not comfortable with it, you aren’t comfortable with macOS.

> Or Linux that lacks the apps that I want to run?

Emulation exists.


Spoken like a real iOS zealot. Some of us remember when macOS or OS X or Mac OS X was just a unix, and are indeed uncomfortable with where Apple took macOS in the past decade or so.

For us, there are still options on the Mac: https://gist.github.com/LeoNatan/b1cf77e1a0df2558f02631656e5...


Using this is probably going to make your life miserable as things break and you don't know why. Or you do, and power through it anyway.


Do you have an example of something that breaks?

Disabling SIP has certainly made my Mac life much better.


Do you have AMFI turned off?


No.


That's why your stuff isn't broken.


You didn't answer my question. Give examples.


All sorts of things break in odd ways, because Apple doesn't really test for this and all the APIs die. TCC is definitely hosed, I've heard of things like Chrome crashes and ADB failing to connect, etc. You really don't want to do this.


> Spoken like a real iOS zealot.

Really? I wouldn’t touch iOS with a ten-foot pole, so that shows what you know.


Not being completely "comfortable" (I'd say satisfied) is a given for any software choice. Nothing is perfect and everything is a tradeoff.

Linux presents no shortage of compromises itself. You could just as well say that if you're not satisfied with native Linux software, then you're not satisfied, or "comfortable", with Linux. This example is especially humorous since you might very well end up bringing another OS into the fold (to virtualize or, heaven forbid, emulate). That's about as strong a signal of dissatisfaction as they come.


There is a crucial difference. With macOS, if Apple does some change to it, you just… live with it. If you’re not comfortable with the direction the author is taking macOS, you probably are not trusting that author in general, and hence probably should abstain from using it. With Linux, it is created by a myriad of creators, and you can freely mix and match. Don’t like what Ubuntu is changing? Use Debian! Don’t like what Gnome is doing? Use KDE! You can completely avoid whatever entity is doing what you consider questionable things, if you so choose. But with macOS, you have macOS from Apple, period. You can’t differentiate between departments or individual authors within Apple; it’s all a monolithic entity. Therefore, if you disagree with a single bit of macOS, like SIP, you can’t remove SIP (and its authors) from your macOS. It’s all macOS from Apple, and you can’t portion out and choose your trust.


Design of macOS since BigSur took such a nosedive.

Buttons are flat text that doesn't look clickable, with the best case of having a very faint border, sometimes only on hover. There are multiple ad-hoc checkbox replacements. There's a jarring cacophony of old macOS and new iPadOS UI elements — old UI elements with small fonts, small padding, and teeensy disclosure indicators share the screen with big fat round blobs lazily transplanted from a touch screen OS. Some elements react to hover, some don't. Some can only be discovered by hovering mouse in a specific location. Menus have varying heights, and varying padding.

Such unpolished inconsistent details used to be a tell-tale of non-native UI toolkits, or skins for other OSes faking a Mac OS X look. Now macOS looks like a hasty unfinished reskin of iPadOS ;(


Agreed. And the poor Settings app. They butchered its soul. I’m sad every time I have to interact with it.


I much prefer it, fwiw. Since MacOS apps have their settings in-app, I rarely use Settings.app and so I could never remember where to find things in the 2D grid of the old app. Now things are much more discoverable, since it’s a 1D layout that I scroll linearly. Even more so because there’s somewhat of a correspondence with iOS, whose Settings.app I use all the time (since iOS apps don’t have settings in-app). I say this as someone who has used macOS for almost 20 years.


I agree. The new settings app is one of few places where new design/reorganisation is actually better and people are annoyed just because of broken habits. Whats really bad though is how individual settings in the app are gradualy disappearing.


I never even try to find things in the 2D grid of the old System Preferences app. I just use Spotlight, or any number of Spotlight replacements that support searching for prefPanes. I say this as someone who has used macOS for almost but less than 20 years: perhaps my first introduction to OS X was Tiger so I'm more accustomed to Spotlight?


I'd say it goes back even further; the Yosemite UI wasn't really good either. The buttons ended up looking so boring with all gradients stripped out.


To me, it seems like the spirit of Jony Ive is still around. Seriously, you should email Craig Federighi about this with (any links to) criticisms or images showing comparisons. Sometimes Apple takes action only when people high up are alerted.


There's an accessibility setting to show button borders in toolbars. I turned it on the day I got my current Mac and now keep forgetting that it's not the default.


I'm puzzled someone in the macOS department made it a priority to fiddle with adding some border to QuickLook when there's so much stuff broken in macOS (and QuickLook itself)


My thoughts exactly. There are so many little UX bugs still needing to be fixed, even in Finder, and somewhere somebody does... this instead?

This rounded rectangle doesn't even make sense. I don't know if I'm baffled more that it was prioritized or that it was even approved in the first place.


New employee ramp-up or keep-busy exercise?


Well that was an interesting journey. I don’t think rounded corners would bother me enough to go digging that deep, but I appreciate that it bothered someone enough that they went to the trouble and wrote it up.


My main objection to something like this (and cheers this person went to great lengths to fix it) is that as shipped you can't tell the difference between an image with square corners that got rounded off by QuickLook, or an image legitimately with rounded corners that looks like QuickLook. It shouldn't have been necessary to go to such trouble to turn that option off, one which will easily interfere with the workflow of a graphics professional.


Graphic professionals use QuickLook??


You’re just asking whether graphics pros use Mac’s. Yes. Many do.


No, that is not what I’m asking at all. On a Mac, almost no one uses quicklook. It’s a weird feature. People use preview pane much more often.


Perhaps you don’t use it, but it is built into the OS and I bet a lot more people use it than you suspect. I find it quite useful all the time.

Did you know it works many places, not just the Finder, including places where there is no preview pane? (Eg with items on the Desktop.)

Did you know you can do useful things right in the Quickview, like mark up an image or PDF? Here’s more: https://www.maketecheasier.com/use-quick-look-macos/


The preview pane is also powered by the QuickLook service and has had the same corner-rounding behaviour added.


also photographers. it's the easiest way to get a clean display for a lot of picture files without importing/opening up another app. just select the files, hit space for quicklook, and go full screen.


I didn’t know the space key did that. Sounds easier than open in preview which is my go to.


yeah quicklook is great (which is the regression in the linked article is very disappointing). not even just for photos, the video preview and trim functionality is great!

although apps can integrate with quicklook (eg vscode/textmate for code files), there are some files that should be previewable but isn't, like animated webp or webm files.


...of course? Macs are very popular among graphics professionals. And QuickLook is how to instantly preview a file in Finder on a Mac.

So why do you think they wouldn't?


Using preview pane is faster and does not require extra steps


I know nothing about mac but damn what is Apple playing at? Have they succumbed to the dumb trend ux people are obsessing over of late - removing buttons or making buttons appear unclickable?

Look at the left and right screenshot. On the left, I can clearly see the Preview button. On the right, it's barely a button. Also, the default window background colour now looks like a washed out water colour brown.

What are they thinking?


Not sure why you were downvoted...

Making buttons that melt into the background is demonstrably bad accessibility.

> Also, the default window background colour now looks like a washed out water colour brown.

That's just a misunderstanding. It isn't a background colour, it's a glassy effect texture. So the "brown" is just from whatever the desktop background image was behind the window. If the second screenshot had the same desktop background and window accent tinting settings then the backgrounds would have appeared the same between screenshots.


And don't forget flagged. I think some people on this site have a vendetta against me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: