-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
bugSomething is brokenSomething is broken
Description
This is a simple error in the documentation for Button::selectable().
The documentation states that the code is equivalent to:
let selected = true;
ui.add(Button::new("toggle me").selected(selected).frame_when_inactive(!selected).frame(true));However, the source code itself refutes this:
pub fn selectable(selected: bool, atoms: impl IntoAtoms<'a>) -> Self {
Self::new(atoms)
.selected(selected)
.frame_when_inactive(selected) // <- not negated!
.frame(true)
}It's a super minor thing, but it just really surprised me when I first tried writing out the equivalent code in full, and the selectable buttons looked unexpectedly wrong.
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken