ui-widgets: the long chord-button story gives its long text as the label, not as painted text

painted is the label as the face shows it (with its access letter) and the label stays the accessible name, so a cut
painted text that is other words was in no name.
This commit is contained in:
bflatastic
2026-11-22 08:18:29 +07:00
parent 7d0a26c937
commit ad0ab4b9c3
+2 -2
View File
@@ -406,10 +406,10 @@ fn button_chord(ui: &mut Ui, _: &mut StoryData) -> StoryOutput {
Button::command(EditCommands::Copy).chord(ButtonChord::Trailing).show(ui).into()
}
/// A long painted label with the chord: the chord shows while the whole label fits beside it.
/// A long label with the chord: the chord shows while the whole label fits beside it.
#[story(Button<'static>, covers = [], drive = Drive::Never, group = "Variants", title = "Chord, long text")]
fn button_chord_long_text(ui: &mut Ui, _: &mut StoryData) -> StoryOutput {
Button::command(EditCommands::Copy).chord(ButtonChord::Trailing).painted("Copy the selected objects to the clipboard").show(ui).into()
Button::command(EditCommands::Copy).chord(ButtonChord::Trailing).label("Copy the selected objects to the clipboard").show(ui).into()
}
/// A room too short for label and chord together: the chord is dropped and the label stays whole.