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

7GUIs circle drawer example does not work #471

Open
GammaSagittarii opened this issue Apr 12, 2024 · 4 comments
Open

7GUIs circle drawer example does not work #471

GammaSagittarii opened this issue Apr 12, 2024 · 4 comments

Comments

@GammaSagittarii
Copy link

Currently dialog widget is not a popup nor a window, but a widget that is fully transparent until shown – which means its size is counted in the layout as if it is always shown. I assume this is just a temporary implementation, and will be changed in the future.
In case I am wrong about it being current expected behavior, you can see what I mean by running 7GUIs circle drawer example. It can be seen in the save dialog example too, it is just not as obvious.

On the left is the current state of the circle drawer example, on the right is version with fixes that restore behavior from the initial commit.

sidebyside

Additional issues in circle drawer example:

  1. Popup menu is not triggering dialog to show - as the on press event is attached to the popup instead of the button in the popup.

  2. If you attach the on press event to the button, the dialog does not show coordinates of the circle it looks like this:
    dialog

  3. The dialog is not closed upon clicking to draw more circles, because it does not have an on blur event.

I have restored previous behavior on my branch fix_circle_drawer. I can make a pull request if you want, but I suspect you’d like to wait with fixes until dialog widget has been improved.

@geom3trik
Copy link
Collaborator

You are right, this example was broken by the last major update. I removed the Dialog view as I wasn't sure if a dedicated view for it was necessary. I was going to replace it with something but forgot, so the example was broken. I'm happy to take a look at your implementation or hear any ideas you have for how you think dialogs should work.

@GammaSagittarii
Copy link
Author

While it would be nice to have the ability to open real additional windows like a dialog window, I don't think it should be a priority for vizia. I think fixing this issue for the with a popup is fine, and a very cool demo. And if opening additional windows is implemented in vizia, the example can be updated. I did run into an issue with positioning of the popup. Using original css bottom: 40px; does not work, I resorted to setting top, left, right, bottom, manually in the code. I will open up a pull request so we can discuss it there.

@GammaSagittarii
Copy link
Author

Just to clarify, the issue seems to be that setting bottom property does nothing if the top is not set.

@geom3trik
Copy link
Collaborator

Just to clarify, the issue seems to be that setting bottom property does nothing if the top is not set.

Oh yeh bottom won't work unless top is set to stretch. Can also work with auto top, which it is by default, but only if the parent sets child-top to stretch.

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

2 participants