I think I finally have a working solution in my notes app 🚀 Don't want to declare victory too early. Will need to do some more testing, but my solution seems really promising. I am now able to hover the ellipsis button in a collapsed heading and the `NSCursor` will correctly change to the `.pointingHand`. Before it would immediately change back to the default, which is the `.iBeam` for text views. This is because the ellipsis button is positioned on top of an `NSTextView`, and text views in AppKit are very aggressive in controlling the `NSCursor` type. Even if you set `.onHover` to change cursor in SwiftUI, it will just get overridden by the text view... image My solution involved controlling the cursor on AppKit-level, as I needed more control than what SwiftUI offers. Part of my solution involved overriding the function `cursorUpdate()` so that can control exactly when the cursor should update. I have a guard that returns early to avoid changing cursor if the hit view is the ellipsis button. I also override the function `mouseMoved()` to constantly set `NSCursor.pointingHand()` whenever the mouse is moved over the button. On a rare occasion, the cursor will flicker, but from my testing, this happens very rarely. #dev #AppKit #SwiftUI #macOS View quoted note →
Having some trouble with changing the `NSCursor` on hover. I have an `NSButton` layered on top of an `NSTextView`, and I want the button to use the `.pointingHand` cursor type when hovering it. But the text view will constantly override the `.pointingHand` back to the default for text views, which is the `.iBeam`. It’s not the first time I’ve been fighting this behavior. I’ve been trying to find a workaround before, but never spent much time on it, as I considered it a low-priority bug fix. But today I finally had the time to figure out a way to fix it. #AppKit #macOS
Semi-truck crashed on E45 Horsens #press
I’m hooked on the Canon C50… Looks like a great hybrid camera like the Sony FX3. I think the C50 and FX3 would be great together (even though their color profile is quite different, but that doesn’t matter for the work I do). One camera with a 35-150mm lens and the other with a 200-600mm. Now, the shitty thing is that I have two lenses for Sony; the Tamron 35-150mm and Sony 200-600mm. Both are incredible lenses. But with Canon, I’d need an RF lens, and I don’t like any of them... The Canon 200-800mm is not bad, but it does not have internal zoom like the Sony does. The reason for me wanting a second camera is so that I don’t have to change lenses all the time. It sucks missing a good shot because you’re messing around with the lenses. Not to mention, the risk of me dropping a lens is quite high when everything around me is so chaotic (like at the big structure fire I was at yesterday).