mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
fix: added missing NetworkChart restoreGState & combinedView separators (#2444)
This commit is contained in:
@@ -205,6 +205,7 @@ public class NetworkChart: WidgetWrapper {
|
|||||||
bottomLinePath.lineWidth = lineWidth
|
bottomLinePath.lineWidth = lineWidth
|
||||||
bottomLinePath.stroke()
|
bottomLinePath.stroke()
|
||||||
|
|
||||||
|
context.restoreGState()
|
||||||
context.saveGState()
|
context.saveGState()
|
||||||
|
|
||||||
var underLinePath = topLinePath.copy() as! NSBezierPath
|
var underLinePath = topLinePath.copy() as! NSBezierPath
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ internal class CombinedView: NSObject, NSGestureRecognizerDelegate {
|
|||||||
w += m.menuBar.view.frame.width + self.spacing
|
w += m.menuBar.view.frame.width + self.spacing
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
if self.separator && i < self.activeModules.count {
|
if self.separator && i < 2 * self.activeModules.count - 1 {
|
||||||
let separator = NSView(frame: NSRect(x: w, y: 3, width: 1, height: Constants.Widget.height-6))
|
let separator = NSView(frame: NSRect(x: w, y: 3, width: 1, height: Constants.Widget.height-6))
|
||||||
separator.wantsLayer = true
|
separator.wantsLayer = true
|
||||||
separator.layer?.backgroundColor = (separator.isDarkMode ? NSColor.black : NSColor.white).cgColor
|
separator.layer?.backgroundColor = (separator.isDarkMode ? NSColor.black : NSColor.white).cgColor
|
||||||
|
|||||||
Reference in New Issue
Block a user