Guy English

@Gte
8.1K Followers
433 Following
77 Posts
@siracusa Sorry, yeah. I’d meant that you can’t get it in modifiers and such in SwiftUI land. The way the app is stuck together is still AppKit and I’ve been taking advantage of that to get specific things done. Yesterday I discovered you can’t put custom views inside SwiftUI menus even though NSMenuItrm has a view property. So I had to poke around to get that working.
@helge Right? I don’t know. The view itself would resize and sometimes it’d jump down from the top, sometimes it’d go from the bottom. It was weird. Maybe I wired up the constraints wrong? The window size was being driven by preferredContentSize. I thought I’d got it right? I’ll revisit at some point. For now it’s ok.
@siracusa Yeah. I had to jump through some weird hoops for various menu things. You (understandably) can’t get the native window handle so you can’t take control of it as you’d like. There’s some rough spots for sure. This is a personal experimental app so that’s fine and part of the purpose of doing it. But I think the AppKit escape hatch approach still needs to be taken if you stay too far off what they expect.
@Moltz @tvaziri “A Klingon *never* wants it smooth!” As he menacingly runs his fingers over his forehead ridges.
@tvaziri Dorn’s performance in the one always cracks me up. He’s just so serious about it!
@sanguish @beccadax Oh nice! I reached for a scroll view to mitigate the jumping. I’ll check how frame can help. If this gets into a decent state I’ll send you a build.
@beccadax So, sadly, my Inspector grows and shrinks vertically with disclosure groups. UtilityWindow exhibits the same issues I had when I manually did an NSPanel. If there’s a big win to be had (and I imagine it’s very difficult and also realize it’s not your domain) it’d be to have AppKit and SwiftUI animations sync better. If not broadly then if the content view of an NSWindow is an NSHostingView then do all the cheating needed to make it great.
(Thanks again for your help!)
@beccadax What the heck!? This is what I get for poking at flags and modifiers on DocumentGroup and stuff. I’ll get the hang of this one day! (The robot let me down here too. I’d mentioned NSPanel and it got bloody minded about the thing) At first glance this looks like it’ll do the trick. I appreciate your help!
Is there really no way to make a SwiftUI window be non-activating? Like if I wanted to make a floating panel that contained an inspector like many Mac apps do / did. I know I can place my SwiftUI inside an NSPanel but then it is janky as hell as the SwiftUI resizing fights with the AppKit resizing and everything jumps around.

If you ever attended C4, I have a favor to ask: the videos from the conference aren’t available online and if you have any of them stashed away, I’d like to get a copy to organize and upload (I have Wolf’s permission to do this).

2006-2009 was such a formative time for both macOS and iOS: these talks are a great record of what was happening.

For those of you who have no idea what I’m talking about:

https://en.wikipedia.org/wiki/C4_(conference)

C4 (conference) - Wikipedia