DynamicColor
DynamicColor copied to clipboard
Shape Style?
Hi,
I've got this code:
VStack {
Text("Active Window Border")
ColorPickerRing(color: $activeWindowBorderColor, strokeWidth: 30)
.frame(width: 100, height: 100, alignment: .center)
HStack {
Button("Cancel") {
// somehow reset color
self.colorPicker = false
}
Button("OK") {
self.colorPicker = false
}
RoundedRectangle(cornerRadius: 5.0)
.fill(activeWindowBorderColor)
}
}.frame(width: 350, height: 350, alignment: .center)
That throws: Instance method 'fill(_:style:)' requires that 'DynamicColor' (aka 'NSColor') conform to 'ShapeStyle'
But when I user Color.white it works.
Can anybody explain that thing with ShapeStyle?