Skip to content

Add SliderOrientation to control slider axis detection#23310

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
moktamd:fix/slider-orientation
Mar 11, 2026
Merged

Add SliderOrientation to control slider axis detection#23310
alice-i-cecile merged 2 commits intobevyengine:mainfrom
moktamd:fix/slider-orientation

Conversation

@moktamd
Copy link
Copy Markdown
Contributor

@moktamd moktamd commented Mar 11, 2026

The Slider widget auto-detects orientation based on dimensions (vertical if height > width). This causes the Feathers slider to behave as vertical when its layout happens to be taller than wide, while its visuals (gradient direction, cursor icon) are hardcoded as horizontal.

Adds a SliderOrientation enum (Auto/Horizontal/Vertical) to give explicit control. Sets the Feathers sliders to Horizontal so their interaction matches their presentation.

Fixes #23294

The Slider widget auto-detects orientation based on dimensions
(vertical if height > width). This causes the Feathers slider to
behave as vertical when its layout happens to be taller than wide,
while its visuals (gradient, cursor) are hardcoded as horizontal.

Add a SliderOrientation enum (Auto/Horizontal/Vertical) to give
explicit control over the slider axis. Set the Feathers sliders
to Horizontal so their interaction matches their visual presentation.

Fixes bevyengine#23294
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@mnmaita mnmaita added C-Feature A new feature, making something new possible A-UI Graphical user interfaces, styles, layouts, and widgets D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 11, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in UI Mar 11, 2026
Copy link
Copy Markdown
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Lovely! No complaints here: that's pretty much exactly how I would have implemented this. You even spotted the a11y integration.

@alice-i-cecile alice-i-cecile added X-Uncontroversial This work is generally agreed upon C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. and removed C-Feature A new feature, making something new possible labels Mar 11, 2026
@moktamd
Copy link
Copy Markdown
Contributor Author

moktamd commented Mar 11, 2026

Thank you!

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 11, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 11, 2026
Merged via the queue into bevyengine:main with commit e8ca385 Mar 11, 2026
52 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in UI Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bevy Feathers Slider assumes always Horizontal but bevy Widget Slider Assumes bigger axis

4 participants