Skip to content

Commit

Permalink
Fix finger color for barres
Browse files Browse the repository at this point in the history
  • Loading branch information
Desbeers committed Sep 11, 2023
1 parent f9ed7e2 commit 6a0758a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/SwiftyChords/ChordPosition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public struct ChordPosition: Codable, Identifiable, Equatable {
let layer = CAShapeLayer()

let primaryColor = forScreen ? primaryColor.cgColor : SWIFTColor.black.cgColor
let backgroundColor = forScreen ? backgroundColor.cgColor : SWIFTColor.white.cgColor

for barre in barres {
let barrePath = CGMutablePath()
Expand Down Expand Up @@ -276,7 +277,7 @@ public struct ChordPosition: Codable, Identifiable, Equatable {
let txtPath = "\(fingers[fretIndex])".path(font: txtFont, rect: txtRect, position: CGPoint(x: transX, y: transY))
fingerLayer.path = txtPath
}
fingerLayer.fillColor = primaryColor
fingerLayer.fillColor = backgroundColor
layer.addSublayer(fingerLayer)
}
}
Expand All @@ -288,7 +289,7 @@ public struct ChordPosition: Codable, Identifiable, Equatable {
let layer = CAShapeLayer()

let primaryColor = forScreen ? primaryColor.cgColor : SWIFTColor.black.cgColor
let backgroundColor = forScreen ? backgroundColor.cgColor : SWIFTColor.black.cgColor
let backgroundColor = forScreen ? backgroundColor.cgColor : SWIFTColor.white.cgColor

for index in 0..<frets.count {
let fret = frets[index]
Expand Down

0 comments on commit 6a0758a

Please sign in to comment.