vanilla icon indicating copy to clipboard operation
vanilla copied to clipboard

Code crash when using Box fillColor or borderColor

Open HugoJourdan opened this issue 2 years ago • 1 comments

Using fillColor or borderColor in Box Object make app crash. (Tested in drawBot and Glyphs3 Macro Panel)

from vanilla import Window, Box, TextBox

class BoxDemo:

    def __init__(self):
        self.w = Window((150, 70))
        self.w.box = Box((10, 10, -10, -10), fillColor=(0,0,1))
        self.w.box.text = TextBox((10, 10, -10, -10), "This is a box")
        self.w.open()

BoxDemo()

HugoJourdan avatar May 29 '22 20:05 HugoJourdan

the color has to be an NSColor object. AppKit.NSColor.colorWithRed_green_blue_alpha_(0, 0, 1, 1)

that is indeed not clear in the documentation. Could you make a PR for this?

thanks!

typemytype avatar May 30 '22 07:05 typemytype