Skip to content

Fix and Polish Feathers Toggle Switch#23830

Merged
alice-i-cecile merged 12 commits intobevyengine:mainfrom
jordanhalase:feathers_toggle_switch_adjust
Apr 17, 2026
Merged

Fix and Polish Feathers Toggle Switch#23830
alice-i-cecile merged 12 commits intobevyengine:mainfrom
jordanhalase:feathers_toggle_switch_adjust

Conversation

@jordanhalase
Copy link
Copy Markdown
Contributor

@jordanhalase jordanhalase commented Apr 16, 2026

Objective

This is a continuation of #23820 for toggle switches to fix their clicking behavior and add more style tokens. Again, adding the ActivateOnPress component will change its state instantly on mouse-press rather than mouse-release.

Styling is also changed for visibility and disambiguation.


Showcase

Before

Screenshot 2026-04-16 at 1 53 12 PM

After

Screenshot 2026-04-16 at 3 32 21 PM

(Not pictured: new intermediate styling for mouse press)

@jordanhalase
Copy link
Copy Markdown
Contributor Author

I added quite a few style tokens this time around. Please let me know if any doc comments don't match the token variable name or token string name.

@alice-i-cecile alice-i-cecile added this to the 0.19 milestone Apr 16, 2026
@alice-i-cecile alice-i-cecile requested a review from viridia April 16, 2026 18:54
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Art Art, UX or graphic design C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. labels Apr 16, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Apr 16, 2026
@alice-i-cecile alice-i-cecile added D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 16, 2026
/// Switch background around the switch (disabled)
pub const SWITCH_BG_DISABLED: ThemeToken = ThemeToken::new_static("feathers.switch.bg.disabled");
/// Switch background around the checkmark
/// Switch background around the switch (checked)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oof, good find.

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.

Good! Surprisingly straightforward. I like the new styles too.

@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Apr 16, 2026
Comment thread crates/bevy_feathers/src/controls/toggle_switch.rs
@kfc35 kfc35 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 Apr 16, 2026
auto-merge was automatically disabled April 17, 2026 01:59

Head branch was pushed to by a user without write access

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 17, 2026
Merged via the queue into bevyengine:main with commit 6c867fa Apr 17, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in UI Apr 17, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Apr 19, 2026
# Objective

Continuation of #23820 and
#23830

This fixes the clicking behavior to toggle on mouse-release, or on
mouse-press with the `ActivateOnPress` component. More styling tokens
are also added for transition states.

---

## Showcase

### Before

<img width="91" height="91" alt="Screenshot 2026-04-17 at 11 32 39 PM"
src="https://github.com/user-attachments/assets/b1b8832d-7aaa-45ee-a641-4c100d44a232"
/>

### After

<img width="91" height="91" alt="Screenshot 2026-04-17 at 11 13 33 PM"
src="https://github.com/user-attachments/assets/d3cf5bf6-1dfe-4d88-8dd1-fc719449e7b5"
/>

(Not pictured: new intermediate styling for mouse press)

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 19, 2026
# Objective

Continuation of #23820,
#23830,
#23869

This adds style tokens to the slider, and adds Pressed events to do so.

## Showcase

No visual change aside from adding hover and pressed style tokens.

<img width="373" height="35" alt="Screenshot 2026-04-18 at 8 05 17 PM"
src="https://github.com/user-attachments/assets/d9fb38f2-10d9-437d-b776-e6d74fdc3756"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Art Art, UX or graphic design A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. C-Usability A targeted quality-of-life change that makes Bevy easier to use 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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants