chore: update iced and fix input single pointer press interaction
This commit is contained in:
parent
9d479248a5
commit
aff337f5dd
2 changed files with 11 additions and 2 deletions
2
iced
2
iced
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3cb80f6a054464cb14a86cf9bac41bf59ca959b0
|
Subproject commit 48bc1b9a1de1e1ae0895f6760d1f9dd0a5d6d686
|
||||||
|
|
@ -1241,7 +1241,16 @@ where
|
||||||
state.dragging_state = Some(DraggingState::Selection);
|
state.dragging_state = Some(DraggingState::Selection);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
state.dragging_state = None;
|
// existing logic for setting the selection
|
||||||
|
let position = if target > 0.0 {
|
||||||
|
update_cache(state, value);
|
||||||
|
find_cursor_position(text_layout.bounds(), value, state, target)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
|
state.cursor.move_to(position.unwrap_or(0));
|
||||||
|
state.dragging_state = Some(DraggingState::Selection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(None, click::Kind::Single, _) => {
|
(None, click::Kind::Single, _) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue