Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup button breaks if used alongside makeLayout #501

Open
tatjam opened this issue Sep 10, 2022 · 1 comment
Open

Popup button breaks if used alongside makeLayout #501

tatjam opened this issue Sep 10, 2022 · 1 comment

Comments

@tatjam
Copy link

tatjam commented Sep 10, 2022

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.

@tatjam
Copy link
Author

tatjam commented Sep 10, 2022

I forgot to mention, if the popup button is added via the makeLayout, it will render fine but the menu will not work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant