fix: added missing NetworkChart restoreGState & combinedView separators (#2444)

This commit is contained in:
Guanzhou Hu
2025-03-16 05:39:24 -05:00
committed by GitHub
parent 5effa6440a
commit bca8ba545e
2 changed files with 2 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ public class NetworkChart: WidgetWrapper {
bottomLinePath.lineWidth = lineWidth
bottomLinePath.stroke()
context.restoreGState()
context.saveGState()
var underLinePath = topLinePath.copy() as! NSBezierPath

View File

@@ -120,7 +120,7 @@ internal class CombinedView: NSObject, NSGestureRecognizerDelegate {
w += m.menuBar.view.frame.width + self.spacing
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))
separator.wantsLayer = true
separator.layer?.backgroundColor = (separator.isDarkMode ? NSColor.black : NSColor.white).cgColor