mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
- rename CircleGraphView to PieWidget
- add option to show/hide the value in PieWidget - add option to fill full pie in PieWidget
This commit is contained in:
@@ -31,7 +31,7 @@ internal class Popup: NSView, Popup_p {
|
||||
private var idleField: NSTextField? = nil
|
||||
|
||||
private var chart: LineChartView? = nil
|
||||
private var circle: CircleGraphView? = nil
|
||||
private var circle: PieChartView? = nil
|
||||
private var temperatureCircle: HalfCircleGraphView? = nil
|
||||
private var frequencyCircle: HalfCircleGraphView? = nil
|
||||
private var initialized: Bool = false
|
||||
@@ -118,7 +118,12 @@ internal class Popup: NSView, Popup_p {
|
||||
let view: NSView = NSView(frame: NSRect(x: 0, y: 0, width: self.frame.width, height: self.dashboardHeight))
|
||||
|
||||
let container: NSView = NSView(frame: NSRect(x: 0, y: 10, width: view.frame.width, height: self.dashboardHeight-20))
|
||||
self.circle = CircleGraphView(frame: NSRect(x: (container.frame.width - container.frame.height)/2, y: 0, width: container.frame.height, height: container.frame.height), segments: [])
|
||||
self.circle = PieChartView(frame: NSRect(
|
||||
x: (container.frame.width - container.frame.height)/2,
|
||||
y: 0,
|
||||
width: container.frame.height,
|
||||
height: container.frame.height
|
||||
), segments: [], drawValue: true)
|
||||
self.circle!.toolTip = LocalizedString("CPU usage")
|
||||
container.addSubview(self.circle!)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ internal class Popup: NSView, Popup_p {
|
||||
private var compressedField: NSTextField? = nil
|
||||
|
||||
private var chart: LineChartView? = nil
|
||||
private var circle: CircleGraphView? = nil
|
||||
private var circle: PieChartView? = nil
|
||||
private var level: PressureView? = nil
|
||||
private var initialized: Bool = false
|
||||
private var processesInitialized: Bool = false
|
||||
@@ -117,7 +117,12 @@ internal class Popup: NSView, Popup_p {
|
||||
let view: NSView = NSView(frame: NSRect(x: 0, y: self.frame.height - self.dashboardHeight, width: self.frame.width, height: self.dashboardHeight))
|
||||
|
||||
let container: NSView = NSView(frame: NSRect(x: 0, y: 10, width: view.frame.width, height: self.dashboardHeight-20))
|
||||
self.circle = CircleGraphView(frame: NSRect(x: (container.frame.width - container.frame.height)/2, y: 0, width: container.frame.height, height: container.frame.height), segments: [])
|
||||
self.circle = PieChartView(frame: NSRect(
|
||||
x: (container.frame.width - container.frame.height)/2,
|
||||
y: 0,
|
||||
width: container.frame.height,
|
||||
height: container.frame.height
|
||||
), segments: [], drawValue: true)
|
||||
self.circle!.toolTip = LocalizedString("Memory usage")
|
||||
container.addSubview(self.circle!)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user