mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
v2.11.7
This commit is contained in:
@@ -530,7 +530,7 @@ internal class Popup: PopupWrapper {
|
||||
PreferencesRow(localizedString("Scale value"), component: self.sliderView!)
|
||||
])
|
||||
view.addArrangedSubview(self.chartPrefSection!)
|
||||
self.chartPrefSection?.toggleVisibility(3, newState: self.lineChartScale == .fixed)
|
||||
self.chartPrefSection?.setRowVisibility(3, newState: self.lineChartScale == .fixed)
|
||||
|
||||
return view
|
||||
}
|
||||
@@ -597,7 +597,7 @@ internal class Popup: PopupWrapper {
|
||||
@objc private func toggleLineChartScale(_ sender: NSMenuItem) {
|
||||
guard let key = sender.representedObject as? String,
|
||||
let value = Scale.allCases.first(where: { $0.key == key }) else { return }
|
||||
self.chartPrefSection?.toggleVisibility(3, newState: value == .fixed)
|
||||
self.chartPrefSection?.setRowVisibility(3, newState: value == .fixed)
|
||||
self.lineChartScale = value
|
||||
self.lineChart?.setScale(self.lineChartScale, fixedScale: self.lineChartFixedScale)
|
||||
Store.shared.set(key: "\(self.title)_lineChartScale", value: key)
|
||||
|
||||
Reference in New Issue
Block a user