-
Notifications
You must be signed in to change notification settings - Fork 51
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
The list widget for magicgui/magicfactory does not inherit layout from top level #672
Comments
cc @hanjinliu, could you have a look? |
Hi @Czaki , @magicgui
def combine_channels(
channels: Annotated[list['napari.layers.Image'], {"layout": "vertical"}],
mode: CombineMode,
) -> 'napari.types.LayerDataTuple':
pass |
I know that I could change it using annotation. I only claim that it is incorrect behavior to always set the layout to horizontal, not depending on the layout of main widget. Especially when using |
Switching layout depending on the parent widget confuses the current implementation of magicgui a lot. When the annotation Eitherway, I don't think there's any "correct" way to say which layout is better. I agree that in your example the layout should be vertical, but there are a lot of different use cases of |
I do not mean to do it in any container. I mean to do it in function that uses |
Describe the bug
If create magicgui widget with a vertical layout, the list widget still have horizontal layout.
It led to horizontal stretching of widgets.
To Reproduce
Use function
Expected behavior
New elements should be added in the same layout as main widget.
Screenshots
Environment (please complete the following information):
I have opened this issue to discuss how to solve this before open PR.
The text was updated successfully, but these errors were encountered: