mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: added check if fan value is less than minimum value (#1365)
This commit is contained in:
@@ -687,7 +687,12 @@ internal class FanView: NSStackView {
|
||||
}
|
||||
|
||||
@objc private func sliderCallback(_ sender: NSSlider) {
|
||||
let value = sender.doubleValue < self.fan.maxSpeed ? sender.doubleValue : self.fan.maxSpeed
|
||||
var value = sender.doubleValue
|
||||
if value > self.fan.maxSpeed {
|
||||
value = self.fan.maxSpeed
|
||||
} else if value < self.fan.minSpeed {
|
||||
value = self.fan.minSpeed
|
||||
}
|
||||
|
||||
self.minBtn?.state = .off
|
||||
self.maxBtn?.state = .off
|
||||
|
||||
Reference in New Issue
Block a user