DynamicColor icon indicating copy to clipboard operation
DynamicColor copied to clipboard

Shape Style?

Open 24unix opened this issue 3 years ago • 0 comments

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?

24unix avatar Dec 17 '20 18:12 24unix