mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed some typo (#1373)
This commit is contained in:
@@ -165,8 +165,8 @@ public class BarChart: WidgetWrapper {
|
||||
var y = offset
|
||||
for a in 0..<self.value[i].count {
|
||||
let partitionValue = self.value[i][a]
|
||||
let partitonHeight = maxPartitionHeight * CGFloat(partitionValue.value)
|
||||
let partition = NSBezierPath(rect: NSRect(x: x, y: y, width: partitionWidth, height: partitonHeight))
|
||||
let partitionHeight = maxPartitionHeight * CGFloat(partitionValue.value)
|
||||
let partition = NSBezierPath(rect: NSRect(x: x, y: y, width: partitionWidth, height: partitionHeight))
|
||||
|
||||
if partitionValue.color == nil {
|
||||
switch self.colorState {
|
||||
@@ -189,7 +189,7 @@ public class BarChart: WidgetWrapper {
|
||||
partition.fill()
|
||||
partition.close()
|
||||
|
||||
y += partitonHeight
|
||||
y += partitionHeight
|
||||
}
|
||||
|
||||
x += partitionWidth + partitionMargin
|
||||
|
||||
@@ -531,7 +531,7 @@ public class MenuBarView: NSView {
|
||||
if let view = self.subviews.first(where: { $0.identifier == NSUserInterfaceItemIdentifier(type.rawValue) }) {
|
||||
view.removeFromSuperview()
|
||||
} else {
|
||||
error("\(type) cound not be removed from the one view bacause not found!")
|
||||
error("\(type) could not be removed from the one view because not found!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,17 +216,17 @@ public class Updater {
|
||||
var toPath = to
|
||||
let fileName = (URL(fileURLWithPath: to.absoluteString)).lastPathComponent
|
||||
let fileExt = (URL(fileURLWithPath: to.absoluteString)).pathExtension
|
||||
var fileNameWithotSuffix: String!
|
||||
var fileNameWithoutSuffix: String!
|
||||
var newFileName: String!
|
||||
var counter = 0
|
||||
|
||||
if fileName.hasSuffix(fileExt) {
|
||||
fileNameWithotSuffix = String(fileName.prefix(fileName.count - (fileExt.count+1)))
|
||||
fileNameWithoutSuffix = String(fileName.prefix(fileName.count - (fileExt.count+1)))
|
||||
}
|
||||
|
||||
while toPath.checkFileExist() {
|
||||
counter += 1
|
||||
newFileName = "\(fileNameWithotSuffix!)-\(counter).\(fileExt)"
|
||||
newFileName = "\(fileNameWithoutSuffix!)-\(counter).\(fileExt)"
|
||||
toPath = to.deletingLastPathComponent().appendingPathComponent(newFileName)
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ import platform
|
||||
|
||||
class UsageException (Exception):
|
||||
"""
|
||||
Raised when the progam detects a usage issue; the top-level code catches this
|
||||
Raised when the program detects a usage issue; the top-level code catches this
|
||||
and prints a usage message.
|
||||
"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user