mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Format the reworked select_all_on_focus.
This commit is contained in:
committed by
bflatastic
parent
173c88d2a1
commit
0c11ff656c
@@ -338,7 +338,9 @@ fn select_all_on_focus(ui: &Ui, resp: &Response, text: &str) {
|
||||
// click, and a release inside one character leaves no text selection, so select-all on
|
||||
// release would replace the drag the user just made (#1326).
|
||||
let dragged = clicked_focus
|
||||
&& ui.data_mut(|d| d.remove_temp::<egui::Pos2>(press_pos)).is_some_and(|p0| ui.input(|i| i.pointer.interact_pos()).is_some_and(|p1| (p1 - p0).length() > 3.0));
|
||||
&& ui
|
||||
.data_mut(|d| d.remove_temp::<egui::Pos2>(press_pos))
|
||||
.is_some_and(|p0| ui.input(|i| i.pointer.interact_pos()).is_some_and(|p1| (p1 - p0).length() > 3.0));
|
||||
if resp.lost_focus() {
|
||||
ui.data_mut(|d| {
|
||||
d.remove_temp::<bool>(pending);
|
||||
|
||||
Reference in New Issue
Block a user