Skip to content

Commit

Permalink
Enable HDR playback again in macOS Sonoma in System Settings
Browse files Browse the repository at this point in the history
Fix m/s unit not being displayed correctly in forecasts
  • Loading branch information
glouel committed Jun 14, 2023
1 parent 4b6b75f commit 1971fa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Aerial/Source/Models/Aerial.swift
Expand Up @@ -21,7 +21,7 @@ class Aerial: NSObject {
// We also track darkmode here now
var darkMode = false

// And we track if we are running under Aerial's Companion app
// And we track if we are running under Aerial's Companion
var underCompanion = false

let userName = NSUserName()
Expand All @@ -38,7 +38,7 @@ class Aerial: NSObject {
}()


// Using HDR will crash System Settings in macOS 13. This is fixed in macOS 14
// Using HDR in the panel will crash System Settings in macOS 13. This is fixed in macOS 14 🎉
func canHDR() -> Bool {
if #available(OSX 13.0, *) {
if #unavailable(OSX 14.0) {
Expand Down
8 changes: 6 additions & 2 deletions Aerial/Source/Views/Layers/Weather/ForecastLayer.swift
Expand Up @@ -362,7 +362,11 @@ class ForecastLayer: CALayer {
let windLayer = CAVCTextLayer()

if PrefsInfo.weather.degree == .celsius {
windLayer.string = "km/h"
if PrefsInfo.weatherWindMode == .kph {
windLayer.string = "km/h"
} else {
windLayer.string = "m/s"
}
} else {
windLayer.string = "mph"
}
Expand Down Expand Up @@ -458,7 +462,7 @@ class ForecastLayer: CALayer {
} else {
wind.string = String(format: "%.0f", speed)
}

// Get something large first
(wind.font, wind.fontSize) = wind.makeFont(name: PrefsInfo.weather.fontName, size: size)

Expand Down

0 comments on commit 1971fa5

Please sign in to comment.