Comments (6)
We'll probably want to wait a bit on the beta issues. Menus were rebuilt using AppKit in Sonoma, there's bound to be issues that get resolved during the beta process! Could you close this issue until the RCs become available at least?
from wwdc.
We'll probably want to wait a bit on the beta issues. Menus were rebuilt using AppKit in Sonoma, there's bound to be issues that get resolved during the beta process! Could you close this issue until the RCs become available at least?
I wasn't actually aware of those AppKit changes, that's nice to know. I just checked my other OS and this also happen in Ventura 13.4.
from wwdc.
This seems to be related to dark/light mode. I did a little looking, we're using the system sharing picker, nothing special. We do override the app's appearance to be dark. It seems the font in the sharing menu is not honoring the appearance while the background is. Whether there is anything we can do about it would require setting up a blank Mac app and minimally reproduce it. If the bug exists in a standard app, I'd say the only option would be to file a feedback. If it doesn't reproduce in a basic app, then more digging would be required.
The relevant code starts at https://github.com/insidegui/WWDC/blob/master/WWDC/AppCoordinator%2BSessionActions.swift#L153-L164 and it invokes the system share sheet which has a delegate
from wwdc.
Gonna leave this here, not sure if we'll do it, but I was able to hack the pop over window to override it's appearance with reasonable results:
NotificationCenter.default.publisher(for: NSApplication.willUpdateNotification).sink { note in
guard let windows = (note.object as? NSApplication)?.windows else { return }
windows.filter { window in
guard let popOverClass = NSClassFromString("_NSPopoverWindow") else { return false }
guard let shareSheetViewControllerClass = NSClassFromString("SHKShareSheetRemoteViewController") else { return false }
return window.isKind(of: popOverClass) && window.contentViewController?.isKind(of: shareSheetViewControllerClass) == true
}
.forEach {
$0.appearance = NSAppearance(named: .darkAqua)
}
}.store(in: &self.cancellables)
from wwdc.
@allenhumphreys I set up a blank project and was able to reproduce the issue, so it's definitely feedback-worthy. The contents of the sharing popover are rendered out-of-process, so there's probably some weird AppKit/ViewBridge bug that's causing the app's appearance propagation to fail.
I tried a few alternatives to your solution, including subclassing NSApplication
and overriding effectiveAppearance
, but that didn't work either.
from wwdc.
Here's another potential solution that covers all popovers in the app (since we definitely want all poppers to inherit the dark appearance):
@objcMembers final class DarkPopover: NSWindow {
static var darkAppearance: NSAppearance? { NSAppearance(named: .darkAqua) }
static func install() {
guard let target = NSClassFromString("_NSPopoverWindow") else { return }
guard let original = class_getInstanceMethod(target, #selector(getter: NSWindow.appearance)) else { return }
guard let replacement = class_getClassMethod(DarkPopover.self, #selector(getter: DarkPopover.darkAppearance)) else { return }
method_exchangeImplementations(original, replacement)
}
}
from wwdc.
Related Issues (20)
- Application performance degrades over time if "Referesh Schedule and Videos Periodically" is enabled HOT 1
- Feature Request: Watch List (Queue) or Watch Later
- Improve bootstrap.sh by checking for Carthage installation HOT 1
- io.realm.asyncOpenDispatchQueue Crashed on macOS 10.15.7 (19H15) HOT 2
- UI issues with macOS Big Sur HOT 1
- Can't see transcripts HOT 1
- Subtitle button is missing after download video HOT 3
- Feature Request: Option for sorting by session number
- Eggy looking sound control element HOT 4
- change language fail
- No contents opened in MacBook Pro 2015 intel CPU HOT 6
- Keeps crashing on macOS Ventura HOT 17
- 7.4b3 just spins, never displays UI HOT 4
- Feat Req: Add `tech-talk` videos HOT 1
- filer is crash HOT 1
- Subtitles UI & Status error, V7.4 HOT 1
- Way to ignore content without videos HOT 3
- When there's only one video result after filtering, clicking on it does not display it HOT 2
- View clipping issues when built against the macOS 14 SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wwdc.