1
0
Fork 0

Preselect the entire text entry dialog

This commit is contained in:
Robbert van der Helm 2022-03-15 12:49:43 +01:00
parent efa1a5a0b4
commit 61c60b5c73

View file

@ -237,11 +237,10 @@ impl<'a, P: Param> Widget<ParamMessage, Renderer> for ParamSlider<'a, P> {
// widget
self.state.drag_active = false;
let mut text_input_state = self.state.text_input_state.borrow_mut();
self.state.text_input_value = Some(self.param.to_string());
self.state
.text_input_state
.borrow_mut()
.move_cursor_to_end();
text_input_state.move_cursor_to_end();
text_input_state.select_all();
} else if self.state.keyboard_modifiers.command()
|| matches!(click.kind(), mouse::click::Kind::Double)
{