mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-04 11:16:59 +00:00
Make appearance setting (system/light/dark) work on Mac.
This commit is contained in:
1 parent
ebdf9528b1
commit
508cd969c3
6 files changed
+80
-34
No files matched your search
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// UserInterfaceColorPalette.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Brent Simmons on 11/6/26.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Notification.Name {
|
||||
static let userInterfaceColorPaletteDidUpdate = Notification.Name("UserInterfaceColorPaletteDidUpdateNotification")
|
||||
}
|
||||
|
||||
/// Whether the app follows the system appearance or is forced to light or dark.
|
||||
enum UserInterfaceColorPalette: Int, CustomStringConvertible, CaseIterable {
|
||||
case automatic = 0 // Follows the system
|
||||
case light = 1
|
||||
case dark = 2
|
||||
|
||||
var description: String {
|
||||
switch self {
|
||||
case .automatic:
|
||||
NSLocalizedString("Automatic", comment: "Automatic")
|
||||
case .light:
|
||||
NSLocalizedString("Light", comment: "Light")
|
||||
case .dark:
|
||||
NSLocalizedString("Dark", comment: "Dark")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user