Skip to content

Commit

Permalink
fix battery widget visibility in darkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban committed Jun 10, 2020
1 parent 064515e commit a9342d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ModuleKit/Widgets/Battery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class BatterykWidget: Widget {
if self.charging {
NSColor.systemGreen.set()
} else {
NSColor.black.set()
NSColor.textColor.set()
}

let bPX: CGFloat = x+w+1
Expand Down
2 changes: 1 addition & 1 deletion Modules/Battery/popup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private class BatteryView: NSView {
let y: CGFloat = (dirtyRect.size.height - h) / 2
let radius: CGFloat = 3
let batteryFrame = NSBezierPath(roundedRect: NSRect(x: x+1, y: y, width: w, height: h), xRadius: radius, yRadius: radius)
NSColor.black.set()
NSColor.textColor.set()

let bPX: CGFloat = x+w+1
let bPY: CGFloat = (dirtyRect.size.height / 2) - 4
Expand Down
4 changes: 2 additions & 2 deletions Stats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0.3;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1547,7 +1547,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0.3;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
6 changes: 3 additions & 3 deletions StatsKit/extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ public extension Double {
switch self {
case 0.2...0.4:
if !color {
return NSColor.black
return NSColor.textColor
}
return NSColor.systemOrange
case 0.4...1:
if self == 1 {
return NSColor.black
return NSColor.textColor
}
if !color {
return NSColor.black
return NSColor.textColor
}
return NSColor.systemGreen
default:
Expand Down

0 comments on commit a9342d1

Please sign in to comment.