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

feat: Allow tool palettes to stack horizontally in addition to the default vertical stacking #64

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

seankmartin
Copy link

@seankmartin seankmartin commented Jan 9, 2025

Summary

This PR introduces a horizontal stacking option to tool palettes, which can be toggled by clicking the button in the palette menu topbar on a per-palette basis. Vertical stacking remains the default. This allows a bit more customisation, and can be particularly helpful if the tool palette is below the viewer like in the below:

image

image

User interaction

In neuroglancer, this setting is available on all tool palettes. Palettes stack vertically by default, and can be manually changed to stack horizontally in the tool palette menu. This is also stored in the state.

Implementation

The primary change is to the tool palette menu, to introduce a setting which changes the widget stacking direction. In addition, there is a slight change to where the tool palette drop zone is positioned. This is so that the horizontal stacking can take up the full space of the element along the x-direction. In horizontal stacking, the drop-zone remains at the bottom of the palette menu, the same as for vertical stacking.

@seankmartin seankmartin requested a review from aranega January 9, 2025 13:13
Copy link
Member

@aranega aranega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good and works well on my side :) 🙏 @seankmartin !

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

Successfully merging this pull request may close these issues.

3 participants