Settings

Theme

Fixing QuickLook (2023)

foon.uk

240 points by rogual 2 years ago · 73 comments

Reader

AnonC 2 years ago

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.

__d 2 years ago

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.

krackers 2 years ago

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.

dlivingston 2 years ago

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.

  • saagarjha 2 years ago

    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 :(

    • fiddlerwoaroof 2 years ago

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

      • mitemte 2 years ago

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

        • fiddlerwoaroof 2 years ago

          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.

      • saagarjha 2 years ago

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

        • TazeTSchnitzel 2 years ago

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

          • saagarjha 2 years ago

            Tell that to ___lldb_unnamed_symbol74$$TextEdit

            • LeoNatan25 2 years ago

              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.

  • LoganDark 2 years ago

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

    • saagarjha 2 years ago

      Fun fact selectors do not have to be human-readable

      • LoganDark 2 years ago

        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.

projektfu 2 years ago

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?

  • codezero 2 years ago

    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 :)

behnamoh 2 years ago

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?
z500 2 years ago

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.

xhruso00 2 years ago

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

harel 2 years ago

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...

  • jimbobthrowawy 2 years ago

    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.

    • harel 2 years ago

      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.

reboot81 2 years ago

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

  • josephcsible 2 years ago

    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.

  • LoganDark 2 years ago

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

  • teddyh 2 years ago

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

    • zarzavat 2 years ago

      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.

      • teddyh 2 years ago

        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.

        • LeoNatan25 2 years ago

          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...

          • saagarjha 2 years ago

            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.

            • lapcat 2 years ago

              Do you have an example of something that breaks?

              Disabling SIP has certainly made my Mac life much better.

          • teddyh 2 years ago

            > Spoken like a real iOS zealot.

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

        • Clamchop 2 years ago

          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.

          • teddyh 2 years ago

            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.

pornel 2 years ago

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 ;(

  • tr3ntg 2 years ago

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

    • toasterlovin 2 years ago

      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.

      • omnimus 2 years ago

        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.

      • kccqzy 2 years ago

        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?

  • infotainment 2 years ago

    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.

  • AnonC 2 years ago

    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.

  • grishka 2 years ago

    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.

fredsted 2 years ago

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)

  • crazygringo 2 years ago

    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.

  • ahefner 2 years ago

    New employee ramp-up or keep-busy exercise?

a2tech 2 years ago

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.

  • classichasclass 2 years ago

    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.

    • sroussey 2 years ago

      Graphic professionals use QuickLook??

      • jtbayly 2 years ago

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

        • sroussey 2 years ago

          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.

          • jtbayly 2 years ago

            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/

          • rogualOP 2 years ago

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

      • raihansaputra 2 years ago

        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.

        • sroussey 2 years ago

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

          • raihansaputra 2 years ago

            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.

      • crazygringo 2 years ago

        ...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?

lloydatkinson 2 years ago

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?

  • spartanatreyu 2 years ago

    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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection