Popup button breaks if used alongside makeLayout
tatjam opened this issue · comments
For example:
var wnd = newWindow(newRect(40, 40, 800, 600))
let pb = PopupButton.new(newRect(120, 90, 120, 20))
pb.items = @["Popup button", "Item 1", "Item 2"]
v.addSubview(pb)
works fine, but adding a makeLayout will break it completely:
var wnd = newWindow(newRect(40, 40, 800, 600))
wnd.makeLayout:
- Label as statusText:
center == super
size == super
text: "status"
let pb = PopupButton.new(newRect(120, 90, 120, 20))
pb.items = @["Popup button", "Item 1", "Item 2"]
v.addSubview(pb)
In the last case, the popup button appears as text in the upper left corner of the window and is impossible to interact with.
I forgot to mention, if the popup button is added via the makeLayout, it will render fine but the menu will not work properly.